OSDN Git Service

xen-netback: remove unecessary condition check before debugfs_remove_recursive
authorzhong jiang <zhongjiang@huawei.com>
Sat, 8 Sep 2018 13:53:42 +0000 (21:53 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Sep 2018 06:02:08 +0000 (23:02 -0700)
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>
drivers/net/xen-netback/netback.c

index 3621e05..80aae3a 100644 (file)
@@ -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();
 }