[PATCH 2/5] ARM: imx: Use PTR_ERR_OR_ZERO in mach-mx31moboard.c
Sachin Kamat
sachin.kamat at linaro.org
Wed May 28 21:57:11 PDT 2014
PTR_ERR_OR_ZERO simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org>
---
arch/arm/mach-imx/mach-mx31moboard.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index 6bed57040973..bb6f8a52a6b8 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -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 = {
--
1.7.9.5
More information about the linux-arm-kernel
mailing list