Commit d3a22442 authored by Fabian Frederick's avatar Fabian Frederick Committed by Shawn Guo

ARM: imx: use PTR_ERR_OR_ZERO

replace IS_ERR/PTR_ERR

Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarShawn Guo <shawn.guo@freescale.com>
parent 26651c43
...@@ -48,9 +48,6 @@ static int __init imxXX_add_mxc_rnga(void) ...@@ -48,9 +48,6 @@ static int __init imxXX_add_mxc_rnga(void)
#endif /* if defined(CONFIG_SOC_IMX31) */ #endif /* if defined(CONFIG_SOC_IMX31) */
ret = ERR_PTR(-ENODEV); ret = ERR_PTR(-ENODEV);
if (IS_ERR(ret)) return PTR_ERR_OR_ZERO(ret);
return PTR_ERR(ret);
return 0;
} }
arch_initcall(imxXX_add_mxc_rnga); arch_initcall(imxXX_add_mxc_rnga);
...@@ -435,10 +435,8 @@ static int __init moboard_usbh2_init(void) ...@@ -435,10 +435,8 @@ static int __init moboard_usbh2_init(void)
return -ENODEV; return -ENODEV;
pdev = imx31_add_mxc_ehci_hs(2, &usbh2_pdata); 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 = { static const struct gpio_led mx31moboard_leds[] __initconst = {
......
...@@ -214,10 +214,8 @@ static int __init devboard_usbh1_init(void) ...@@ -214,10 +214,8 @@ static int __init devboard_usbh1_init(void)
usbh1_pdata.otg = phy; usbh1_pdata.otg = phy;
pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); 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);
} }
......
...@@ -328,10 +328,8 @@ static int __init marxbot_usbh1_init(void) ...@@ -328,10 +328,8 @@ static int __init marxbot_usbh1_init(void)
usbh1_pdata.otg = phy; usbh1_pdata.otg = phy;
pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata); 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 = { static const struct fsl_usb2_platform_data usb_pdata __initconst = {
......
...@@ -142,10 +142,8 @@ static int __init smartbot_otg_host_init(void) ...@@ -142,10 +142,8 @@ static int __init smartbot_otg_host_init(void)
return -ENODEV; return -ENODEV;
pdev = imx31_add_mxc_ehci_otg(&otg_host_pdata); 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 #else
static inline int smartbot_otg_host_init(void) { return 0; } static inline int smartbot_otg_host_init(void) { return 0; }
......
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