diff options
author | Varka Bhadram <varkabhadram@gmail.com> | 2014-11-03 21:21:24 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-07 12:01:50 -0500 |
commit | 69b89c603bdbc495a751c926b6311ce3db018f04 (patch) | |
tree | 8689902eec4724ef5540b6ca97e093912a8b1300 | |
parent | 073153bf227649057a911ff8d4383117fb866e2b (diff) |
host: ehci-orion: 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>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/ehci-orion.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index 22e15cab8ea5..36b46576e5b3 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
@@ -175,15 +175,6 @@ static int ehci_orion_drv_probe(struct platform_device *pdev) | |||
175 | goto err; | 175 | goto err; |
176 | } | 176 | } |
177 | 177 | ||
178 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
179 | if (!res) { | ||
180 | dev_err(&pdev->dev, | ||
181 | "Found HC with no register addr. Check %s setup!\n", | ||
182 | dev_name(&pdev->dev)); | ||
183 | err = -ENODEV; | ||
184 | goto err; | ||
185 | } | ||
186 | |||
187 | /* | 178 | /* |
188 | * Right now device-tree probed devices don't get dma_mask | 179 | * Right now device-tree probed devices don't get dma_mask |
189 | * set. Since shared usb code relies on it, set it here for | 180 | * set. Since shared usb code relies on it, set it here for |
@@ -193,6 +184,7 @@ static int ehci_orion_drv_probe(struct platform_device *pdev) | |||
193 | if (err) | 184 | if (err) |
194 | goto err; | 185 | goto err; |
195 | 186 | ||
187 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
196 | regs = devm_ioremap_resource(&pdev->dev, res); | 188 | regs = devm_ioremap_resource(&pdev->dev, res); |
197 | if (IS_ERR(regs)) { | 189 | if (IS_ERR(regs)) { |
198 | err = PTR_ERR(regs); | 190 | err = PTR_ERR(regs); |