netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] netdevsim: correctly check return value of debugfs_create_dir
@ 2017-12-08  0:52 Prashant Bhole
  2017-12-08  1:12 ` Jakub Kicinski
  2017-12-08 15:31 ` David Miller
  0 siblings, 2 replies; 15+ messages in thread
From: Prashant Bhole @ 2017-12-08  0:52 UTC (permalink / raw)
  To: David S . Miller; +Cc: Prashant Bhole, netdev, Jakub Kicinski

Return value is now checked with IS_ERROR_OR_NULL because
debugfs_create_dir doesn't return error value. It either returns
NULL or a valid pointer.

Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
---
 drivers/net/netdevsim/netdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
index eb8c679fca9f..88d8ee2c89da 100644
--- a/drivers/net/netdevsim/netdev.c
+++ b/drivers/net/netdevsim/netdev.c
@@ -469,7 +469,7 @@ static int __init nsim_module_init(void)
 	int err;
 
 	nsim_ddir = debugfs_create_dir(DRV_NAME, NULL);
-	if (IS_ERR(nsim_ddir))
+	if (IS_ERR_OR_NULL(nsim_ddir))
 		return PTR_ERR(nsim_ddir);
 
 	err = bus_register(&nsim_bus);
-- 
2.13.6

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

end of thread, other threads:[~2017-12-20  1:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-08  0:52 [PATCH net-next] netdevsim: correctly check return value of debugfs_create_dir Prashant Bhole
2017-12-08  1:12 ` Jakub Kicinski
2017-12-08  2:12   ` Prashant Bhole
2017-12-08 15:31 ` David Miller
2017-12-11  4:46   ` Prashant Bhole
2017-12-11 18:40     ` Jakub Kicinski
2017-12-19  4:45       ` Prashant Bhole
2017-12-19 14:11         ` David Miller
2017-12-20  0:16           ` Prashant Bhole
2017-12-20  0:30             ` Jakub Kicinski
2017-12-20  0:38               ` Prashant Bhole
2017-12-20  0:45                 ` Jakub Kicinski
2017-12-20  0:54                   ` Prashant Bhole
2017-12-20  1:18                     ` Jakub Kicinski
2017-12-20  1:40                       ` Prashant Bhole

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).