summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-octeon.c
diff options
context:
space:
mode:
authorVarka Bhadram <varkabhadram@gmail.com>2014-11-04 07:51:23 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-07 09:01:50 -0800
commit073153bf227649057a911ff8d4383117fb866e2b (patch)
treeb2539fdd46014b249bea10b115070d1636965740 /drivers/usb/host/ehci-octeon.c
parentd6e269ae4fb147eaa65ae6980064ee0c013fc7d6 (diff)
downloadlinux-073153bf227649057a911ff8d4383117fb866e2b.tar.bz2
host: ehci-octeon: remove duplicate check on resource
Sanity check on resource happening with devm_ioremap_resource(). Signed-off-by: Varka Bhadram <varkab@cdac.in> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-octeon.c')
-rw-r--r--drivers/usb/host/ehci-octeon.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/usb/host/ehci-octeon.c b/drivers/usb/host/ehci-octeon.c
index 9051439039a7..2d0c4bcba579 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();