Commit 1f79b26c authored by Varka Bhadram's avatar Varka Bhadram Committed by Felipe Balbi

usb: musb: core: remove duplicate check on resource

Sanity check on resource happening with devm_ioremap_resource().
Signed-off-by: default avatarVarka Bhadram <varkab@cdac.in>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 76833075
...@@ -2080,10 +2080,10 @@ static int musb_probe(struct platform_device *pdev) ...@@ -2080,10 +2080,10 @@ static int musb_probe(struct platform_device *pdev)
struct resource *iomem; struct resource *iomem;
void __iomem *base; void __iomem *base;
iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (irq <= 0)
if (!iomem || irq <= 0)
return -ENODEV; return -ENODEV;
iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(dev, iomem); base = devm_ioremap_resource(dev, iomem);
if (IS_ERR(base)) if (IS_ERR(base))
return PTR_ERR(base); return PTR_ERR(base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment