phy: omap-usb2: fix devm_ioremap_resource error detection code
[cascardo/linux.git] / drivers / phy / phy-omap-usb2.c
index 7007c11..2063d54 100644 (file)
@@ -233,8 +233,8 @@ static int omap_usb2_probe(struct platform_device *pdev)
        if (phy_data->flags & OMAP_USB2_CALIBRATE_FALSE_DISCONNECT) {
                res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
                phy->phy_base = devm_ioremap_resource(&pdev->dev, res);
-               if (!phy->phy_base)
-                       return -ENOMEM;
+               if (IS_ERR(phy->phy_base))
+                       return PTR_ERR(phy->phy_base);
                phy->flags |= OMAP_USB2_CALIBRATE_FALSE_DISCONNECT;
        }