* [PATCH] ARM: imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
@ 2013-11-06 7:52 Duan Jiong
2013-11-06 8:47 ` Uwe Kleine-König
0 siblings, 1 reply; 3+ messages in thread
From: Duan Jiong @ 2013-11-06 7:52 UTC (permalink / raw)
To: kernel, linux; +Cc: linux-kernel, Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
---
arch/arm/mach-imx/mx31moboard-smartbot.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/arm/mach-imx/mx31moboard-smartbot.c b/arch/arm/mach-imx/mx31moboard-smartbot.c
index 04ae45d..af6550e 100644
--- a/arch/arm/mach-imx/mx31moboard-smartbot.c
+++ b/arch/arm/mach-imx/mx31moboard-smartbot.c
@@ -141,10 +141,7 @@ 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; }
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ARM: imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
2013-11-06 7:52 [PATCH] ARM: imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO Duan Jiong
@ 2013-11-06 8:47 ` Uwe Kleine-König
0 siblings, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2013-11-06 8:47 UTC (permalink / raw)
To: Duan Jiong; +Cc: kernel, linux, linux-kernel
On Wed, Nov 06, 2013 at 03:52:45PM +0800, Duan Jiong wrote:
> This patch fixes coccinelle error regarding usage of IS_ERR and
> PTR_ERR instead of PTR_ERR_OR_ZERO.
>
> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> arch/arm/mach-imx/mx31moboard-smartbot.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-imx/mx31moboard-smartbot.c b/arch/arm/mach-imx/mx31moboard-smartbot.c
> index 04ae45d..af6550e 100644
> --- a/arch/arm/mach-imx/mx31moboard-smartbot.c
> +++ b/arch/arm/mach-imx/mx31moboard-smartbot.c
> @@ -141,10 +141,7 @@ 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; }
> --
> 1.8.3.1
>
>
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
@ 2014-04-11 7:46 Duan Jiong
0 siblings, 0 replies; 3+ messages in thread
From: Duan Jiong @ 2014-04-11 7:46 UTC (permalink / raw)
To: shawn.guo, kernel, linux; +Cc: linux-kernel, Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and
PTR_ERR instead of PTR_ERR_OR_ZERO.
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
---
arch/arm/mach-imx/mx31moboard-smartbot.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/arm/mach-imx/mx31moboard-smartbot.c b/arch/arm/mach-imx/mx31moboard-smartbot.c
index 04ae45d..af6550e 100644
--- a/arch/arm/mach-imx/mx31moboard-smartbot.c
+++ b/arch/arm/mach-imx/mx31moboard-smartbot.c
@@ -141,10 +141,7 @@ 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; }
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-11 7:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-06 7:52 [PATCH] ARM: imx: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO Duan Jiong
2013-11-06 8:47 ` Uwe Kleine-König
2014-04-11 7:46 Duan Jiong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®