Skip to content

Commit

Permalink
usb: musb: core: 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 7683307 commit 1f79b26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2080,10 +2080,10 @@ static int musb_probe(struct platform_device *pdev)
struct resource *iomem;
void __iomem *base;

iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!iomem || irq <= 0)
if (irq <= 0)
return -ENODEV;

iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(dev, iomem);
if (IS_ERR(base))
return PTR_ERR(base);
Expand Down

0 comments on commit 1f79b26

Please sign in to comment.