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

host: ohci-da8xx: 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 0fb5f700
...@@ -313,16 +313,13 @@ static int usb_hcd_da8xx_probe(const struct hc_driver *driver, ...@@ -313,16 +313,13 @@ static int usb_hcd_da8xx_probe(const struct hc_driver *driver,
return -ENOMEM; return -ENOMEM;
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!mem)
return -ENODEV;
hcd->rsrc_start = mem->start;
hcd->rsrc_len = resource_size(mem);
hcd->regs = devm_ioremap_resource(&pdev->dev, mem); hcd->regs = devm_ioremap_resource(&pdev->dev, mem);
if (IS_ERR(hcd->regs)) { if (IS_ERR(hcd->regs)) {
error = PTR_ERR(hcd->regs); error = PTR_ERR(hcd->regs);
goto err; goto err;
} }
hcd->rsrc_start = mem->start;
hcd->rsrc_len = resource_size(mem);
ohci_hcd_init(hcd_to_ohci(hcd)); ohci_hcd_init(hcd_to_ohci(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