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

host: ehci-sh: 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 15c85d9c
...@@ -86,15 +86,6 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev) ...@@ -86,15 +86,6 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev)
if (usb_disabled()) if (usb_disabled())
return -ENODEV; return -ENODEV;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(&pdev->dev,
"Found HC with no register addr. Check %s setup!\n",
dev_name(&pdev->dev));
ret = -ENODEV;
goto fail_create_hcd;
}
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq <= 0) { if (irq <= 0) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
...@@ -114,14 +105,14 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev) ...@@ -114,14 +105,14 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev)
goto fail_create_hcd; goto fail_create_hcd;
} }
hcd->rsrc_start = res->start; res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
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 fail_request_resource; goto fail_request_resource;
} }
hcd->rsrc_start = res->start;
hcd->rsrc_len = resource_size(res);
priv = devm_kzalloc(&pdev->dev, sizeof(struct ehci_sh_priv), priv = devm_kzalloc(&pdev->dev, sizeof(struct ehci_sh_priv),
GFP_KERNEL); GFP_KERNEL);
......
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