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 3621e05a7494c43a94084fa79a6959fa428f64ec..80aae3a32c2a3ad90d0ca8c98a37e666de1bd4a6 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();
 }