summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVarka Bhadram <varkabhadram@gmail.com>2014-10-29 17:00:19 +0100
committerFelipe Balbi <balbi@ti.com>2014-11-03 17:01:21 +0100
commit1f79b26cf3090f024b3a02cfc3b692bc6482c576 (patch)
tree9b5cc8b76b8232b62e81d5df5a480014cbe726b5
parentusb: musb: dsps: remove duplicate check on resource (diff)
downloadlinux-1f79b26cf3090f024b3a02cfc3b692bc6482c576.tar.xz
linux-1f79b26cf3090f024b3a02cfc3b692bc6482c576.zip
usb: musb: core: remove duplicate check on resource
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>
Diffstat (limited to '')
-rw-r--r--drivers/usb/musb/musb_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index b841ee0bff06..55ebd4b1daac 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -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);