xen-netback: no need to check return value of debugfs_create functions
Subsystems (3)
PATCH 1/1 xen-netback: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this.
--- drivers/net/xen-netback/netback.c | 3 -- drivers/net/xen-netback/xenbus.c | 46 ++++++++----------------------- 2 files changed, 11 insertions(+), 38 deletions(-)
drivers/net/xen-netback/netback.c +0 -3
@@ -1653,9 +1653,6 @@ static int __init netback_init(void)#ifdef CONFIG_DEBUG_FS xen_netback_dbg_root =debugfs_create_dir ("xen-netback" ,NULL ); -if (IS_ERR_OR_NULL (xen_netback_dbg_root)) -pr_warn ("Init of debugfs returned %ld!\n" , -PTR_ERR (xen_netback_dbg_root));#endif /* CONFIG_DEBUG_FS */ return 0 ;
drivers/net/xen-netback/xenbus.c +11 -35
61 lines not on this page · raw message
Signature · 1 line
2.22.0
Quoted 9 lines · Greg Kroah-Hartman
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this.
Cc Wei Liu <[email protected]>Cc Paul Durrant <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
From: Greg Kroah-Hartman <[email protected]>
Date: Sat, 10 Aug 2019 12:31:08 +0200
Quoted 9 lines
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this.
Cc Wei Liu <[email protected]>Cc Paul Durrant <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Applied to net-next.