All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/apne: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
@ 2014-04-11  8:37 Duan Jiong
  2014-04-12  6:01 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Duan Jiong @ 2014-04-11  8:37 UTC (permalink / raw)
  To: davem, tedheadster, geert; +Cc: netdev, 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>
---
 drivers/net/ethernet/8390/apne.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/8390/apne.c b/drivers/net/ethernet/8390/apne.c
index 30104b6..c56ac9e 100644
--- a/drivers/net/ethernet/8390/apne.c
+++ b/drivers/net/ethernet/8390/apne.c
@@ -560,9 +560,7 @@ static struct net_device *apne_dev;
 static int __init apne_module_init(void)
 {
 	apne_dev = apne_probe(-1);
-	if (IS_ERR(apne_dev))
-		return PTR_ERR(apne_dev);
-	return 0;
+	return PTR_ERR_OR_ZERO(apne_dev);
 }
 
 static void __exit apne_module_exit(void)
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/apne: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
  2014-04-11  8:37 [PATCH] net/apne: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO Duan Jiong
@ 2014-04-12  6:01 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-04-12  6:01 UTC (permalink / raw)
  To: duanj.fnst; +Cc: tedheadster, geert, netdev

From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Date: Fri, 11 Apr 2014 16:37:37 +0800

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-12  6:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-11  8:37 [PATCH] net/apne: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO Duan Jiong
2014-04-12  6:01 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.