Re: [PATCH net-next] netdevsim: remove check on return value of debugfs_create_dir

From
Jakub Kicinski <hidden>
Date
2017-12-08 02:47:36
Reply to
Prashant Bhole, 2017-12-08
On Fri,  8 Dec 2017 11:14:56 +0900, Prashant Bhole wrote:
Initial discussion started about correct handling of this condition.
Later it was decided to remove this check altogether to make it
consistent.

Removal of this check isn't fatal to this driver.

Signed-off-by: Prashant Bhole <redacted>
Acked-by: Jakub Kicinski <redacted>

but as I mentioned there is another, similar check in netdevsim/bpf.c:
"... drop this error handling here and in nsim_bpf_create_prog()."
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
index eb8c679fca9f..6d4b35f26ae5 100644
--- a/drivers/net/netdevsim/netdev.c
+++ b/drivers/net/netdevsim/netdev.c
@@ -469,8 +469,6 @@ static int __init nsim_module_init(void)
 	int err;
 
 	nsim_ddir = debugfs_create_dir(DRV_NAME, NULL);
-	if (IS_ERR(nsim_ddir))
-		return PTR_ERR(nsim_ddir);
 
 	err = bus_register(&nsim_bus);
 	if (err)
Thread (3 messages) 3 messages, 3 authors, last reply 2017-12-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help