Commit d6e269ae authored by Varka Bhadram's avatar Varka Bhadram Committed by Greg Kroah-Hartman

host: ehci-mxc: remove duplicate check on resource

Sanity check on resource happening with devm_ioremap_resource().
Signed-off-by: default avatarVarka Bhadram <varkab@cdac.in>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6144171d
...@@ -69,20 +69,13 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev) ...@@ -69,20 +69,13 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(dev, "Found HC with no register addr. Check setup!\n");
ret = -ENODEV;
goto err_alloc;
}
hcd->rsrc_start = res->start;
hcd->rsrc_len = resource_size(res);
hcd->regs = devm_ioremap_resource(&pdev->dev, res); hcd->regs = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(hcd->regs)) { if (IS_ERR(hcd->regs)) {
ret = PTR_ERR(hcd->regs); ret = PTR_ERR(hcd->regs);
goto err_alloc; goto err_alloc;
} }
hcd->rsrc_start = res->start;
hcd->rsrc_len = resource_size(res);
hcd->has_tt = 1; hcd->has_tt = 1;
ehci = hcd_to_ehci(hcd); ehci = hcd_to_ehci(hcd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment