[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1415067694-9473-22-git-send-email-varkabhadram@gmail.com>
Date: Tue, 4 Nov 2014 07:51:28 +0530
From: varkabhadram@...il.com
To: gregkh@...uxfoundation.org, linux-usb@...r.kernel.org
Cc: balbi@...com, stern@...land.harvard.edu,
sergei.shtylyov@...entembedded.com, linux-kernel@...r.kernel.org,
Varka Bhadram <varkabhadram@...il.com>,
Varka Bhadram <varkab@...c.in>
Subject: [PATCH usb v4 21/27] musb: musb_core: remove duplicate check on resource
From: Varka Bhadram <varkabhadram@...il.com>
Sanity check on resource happening with devm_ioremap_resource().
Signed-off-by: Varka Bhadram <varkab@...c.in>
---
drivers/usb/musb/musb_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index b841ee0..55ebd4b 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);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists