Skip to content

Commit

Permalink
xen-netback: remove unecessary condition check before debugfs_remove_…
Browse files Browse the repository at this point in the history
…recursive

debugfs_remove_recursive has taken IS_ERR_OR_NULL into account. So just
remove the condition check before debugfs_remove_recursive.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
zhong jiang authored and David S. Miller committed Sep 12, 2018
1 parent 0527097 commit aad06d1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/xen-netback/netback.c
Original file line number Diff line number Diff line change
@@ -1660,8 +1660,7 @@ module_init(netback_init);
static void __exit netback_fini(void)
{
#ifdef CONFIG_DEBUG_FS
if (!IS_ERR_OR_NULL(xen_netback_dbg_root))
debugfs_remove_recursive(xen_netback_dbg_root);
debugfs_remove_recursive(xen_netback_dbg_root);
#endif /* CONFIG_DEBUG_FS */
xenvif_xenbus_fini();
}

0 comments on commit aad06d1

Please sign in to comment.