[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1415067694-9473-17-git-send-email-varkabhadram@gmail.com>
Date: Tue, 4 Nov 2014 07:51:23 +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 16/27] host: ehci-octeon: 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>
Acked-by: Alan Stern <stern@...land.harvard.edu>
---
drivers/usb/host/ehci-octeon.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/usb/host/ehci-octeon.c b/drivers/usb/host/ehci-octeon.c
index 9051439..2d0c4bc 100644
--- a/drivers/usb/host/ehci-octeon.c
+++ b/drivers/usb/host/ehci-octeon.c
@@ -106,12 +106,6 @@ static int ehci_octeon_drv_probe(struct platform_device *pdev)
return -ENODEV;
}
- res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (res_mem == NULL) {
- dev_err(&pdev->dev, "No register space assigned\n");
- return -ENODEV;
- }
-
/*
* We can DMA from anywhere. But the descriptors must be in
* the lower 4GB.
@@ -125,14 +119,14 @@ static int ehci_octeon_drv_probe(struct platform_device *pdev)
if (!hcd)
return -ENOMEM;
- hcd->rsrc_start = res_mem->start;
- hcd->rsrc_len = resource_size(res_mem);
-
+ res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
hcd->regs = devm_ioremap_resource(&pdev->dev, res_mem);
if (IS_ERR(hcd->regs)) {
ret = PTR_ERR(hcd->regs);
goto err1;
}
+ hcd->rsrc_start = res_mem->start;
+ hcd->rsrc_len = resource_size(res_mem);
ehci_octeon_start();
--
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