diff options
author | Varka Bhadram <varkabhadram@gmail.com> | 2014-11-03 21:21:26 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-07 12:01:51 -0500 |
commit | 3b59d31dd86b4839a62ac05de708cca3e20dfed4 (patch) | |
tree | 60a28eb4c2d21efe70ed90f0f038dc889ee051ff /drivers/usb/host | |
parent | 2062ff489ca9d97b4bfee56e944727d9b02b0d63 (diff) |
host: ehci-spear: 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')
-rw-r--r-- | drivers/usb/host/ehci-spear.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/usb/host/ehci-spear.c b/drivers/usb/host/ehci-spear.c index 1355ff0946b9..34e14746b92e 100644 --- a/drivers/usb/host/ehci-spear.c +++ b/drivers/usb/host/ehci-spear.c | |||
@@ -99,18 +99,13 @@ static int spear_ehci_hcd_drv_probe(struct platform_device *pdev) | |||
99 | } | 99 | } |
100 | 100 | ||
101 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 101 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
102 | if (!res) { | ||
103 | retval = -ENODEV; | ||
104 | goto err_put_hcd; | ||
105 | } | ||
106 | |||
107 | hcd->rsrc_start = res->start; | ||
108 | hcd->rsrc_len = resource_size(res); | ||
109 | hcd->regs = devm_ioremap_resource(&pdev->dev, res); | 102 | hcd->regs = devm_ioremap_resource(&pdev->dev, res); |
110 | if (IS_ERR(hcd->regs)) { | 103 | if (IS_ERR(hcd->regs)) { |
111 | retval = PTR_ERR(hcd->regs); | 104 | retval = PTR_ERR(hcd->regs); |
112 | goto err_put_hcd; | 105 | goto err_put_hcd; |
113 | } | 106 | } |
107 | hcd->rsrc_start = res->start; | ||
108 | hcd->rsrc_len = resource_size(res); | ||
114 | 109 | ||
115 | sehci = to_spear_ehci(hcd); | 110 | sehci = to_spear_ehci(hcd); |
116 | sehci->clk = usbh_clk; | 111 | sehci->clk = usbh_clk; |