Skip to content

Commit

Permalink
usb: renesas_usbhs: common: remove duplicate check on resource
Browse files Browse the repository at this point in the history
Sanity check on resource happening with devm_ioremap_resource().

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Varka Bhadram authored and Felipe Balbi committed Nov 3, 2014
1 parent 4d85201 commit 687f16b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/renesas_usbhs/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,8 @@ static int usbhs_probe(struct platform_device *pdev)
}

/* platform data */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res || !irq_res) {
if (!irq_res) {
dev_err(&pdev->dev, "Not enough Renesas USB platform resources.\n");
return -ENODEV;
}
Expand All @@ -508,6 +507,7 @@ static int usbhs_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
Expand Down

0 comments on commit 687f16b

Please sign in to comment.