ARM: imx: use PTR_ERR_OR_ZERO
authorFabian Frederick <fabf@skynet.be>
Fri, 4 Jul 2014 19:03:10 +0000 (21:03 +0200)
committerShawn Guo <shawn.guo@freescale.com>
Fri, 18 Jul 2014 08:11:36 +0000 (16:11 +0800)
replace IS_ERR/PTR_ERR

Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
arch/arm/mach-imx/devices/platform-mxc_rnga.c
arch/arm/mach-imx/mach-mx31moboard.c
arch/arm/mach-imx/mx31moboard-devboard.c
arch/arm/mach-imx/mx31moboard-marxbot.c
arch/arm/mach-imx/mx31moboard-smartbot.c

index c58404badb592080d6ff3702200c6bebb97cdc0f..851fbc8af7a9fd4bb20ec154deb6f1f79ca75e12 100644 (file)
@@ -48,9 +48,6 @@ static int __init imxXX_add_mxc_rnga(void)
 #endif /* if defined(CONFIG_SOC_IMX31) */
                ret = ERR_PTR(-ENODEV);
 
-       if (IS_ERR(ret))
-               return PTR_ERR(ret);
-
-       return 0;
+       return PTR_ERR_OR_ZERO(ret);
 }
 arch_initcall(imxXX_add_mxc_rnga);
index 6bed57040973ebd4fbc2f14c9236efad1d4f45b8..bb6f8a52a6b8b2ebaba9b8be1dc6f9478cfc3c2c 100644 (file)
@@ -435,10 +435,8 @@ static int __init moboard_usbh2_init(void)
                return -ENODEV;
 
        pdev = imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
-       if (IS_ERR(pdev))
-               return PTR_ERR(pdev);
 
-       return 0;
+       return PTR_ERR_OR_ZERO(pdev);
 }
 
 static const struct gpio_led mx31moboard_leds[] __initconst = {
index 1e4ea1640a2af9031bb693ab5d8b652f7702fe6a..1e91a0918e8341220f16adea31c01cccba57e980 100644 (file)
@@ -214,10 +214,8 @@ static int __init devboard_usbh1_init(void)
        usbh1_pdata.otg = phy;
 
        pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata);
-       if (IS_ERR(pdev))
-               return PTR_ERR(pdev);
 
-       return 0;
+       return PTR_ERR_OR_ZERO(pdev);
 }
 
 
index 699d01a4fef8dd9bbb5207d93f7c588103e52dcd..2e895a82a6eb39627f10b53424f9384070f06a89 100644 (file)
@@ -328,10 +328,8 @@ static int __init marxbot_usbh1_init(void)
        usbh1_pdata.otg = phy;
 
        pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata);
-       if (IS_ERR(pdev))
-               return PTR_ERR(pdev);
 
-       return 0;
+       return PTR_ERR_OR_ZERO(pdev);
 }
 
 static const struct fsl_usb2_platform_data usb_pdata __initconst = {
index 4b3d66eb8d34a57a7ed1b1f84b5617ebcf06550c..89fc35a64448646f2d99567c79010450e62ed058 100644 (file)
@@ -142,10 +142,8 @@ static int __init smartbot_otg_host_init(void)
                return -ENODEV;
 
        pdev = imx31_add_mxc_ehci_otg(&otg_host_pdata);
-       if (IS_ERR(pdev))
-               return PTR_ERR(pdev);
 
-       return 0;
+       return PTR_ERR_OR_ZERO(pdev);
 }
 #else
 static inline int smartbot_otg_host_init(void) { return 0; }