Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[cascardo/linux.git] / drivers / usb / host / ehci-sh.c
index 9b9b9f5..0e0ce68 100644 (file)
@@ -86,15 +86,6 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev)
        if (usb_disabled())
                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);
        if (irq <= 0) {
                dev_err(&pdev->dev,
@@ -114,19 +105,18 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev)
                goto fail_create_hcd;
        }
 
-       hcd->rsrc_start = res->start;
-       hcd->rsrc_len = resource_size(res);
-
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        hcd->regs = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(hcd->regs)) {
                ret = PTR_ERR(hcd->regs);
                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),
                            GFP_KERNEL);
        if (!priv) {
-               dev_dbg(&pdev->dev, "error allocating priv data\n");
                ret = -ENOMEM;
                goto fail_request_resource;
        }