Merge tag '6.6-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6
[sfrench/cifs-2.6.git] / drivers / usb / host / ehci-atmel.c
index 61808c51e702cb24efd6ef789c170990c7468122..6a6e1c510b2838dc59889cca11f7d217a9b077dc 100644 (file)
@@ -102,8 +102,8 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
        pr_debug("Initializing Atmel-SoC USB Host Controller\n");
 
        irq = platform_get_irq(pdev, 0);
-       if (irq <= 0) {
-               retval = -ENODEV;
+       if (irq < 0) {
+               retval = irq;
                goto fail_create_hcd;
        }
 
@@ -122,8 +122,7 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
        }
        atmel_ehci = hcd_to_atmel_ehci_priv(hcd);
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       hcd->regs = devm_ioremap_resource(&pdev->dev, res);
+       hcd->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
        if (IS_ERR(hcd->regs)) {
                retval = PTR_ERR(hcd->regs);
                goto fail_request_resource;