brcm80211: remove redundant condition check before debugfs_remove_recursive
authorzhong jiang <zhongjiang@huawei.com>
Sat, 8 Sep 2018 13:40:43 +0000 (21:40 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 20 Sep 2018 12:10:16 +0000 (15:10 +0300)
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmsmac/debug.c

index 2fe1f686327822e48cab3d1d6e0539bb43eb0b41..3bd54f125776217cec982a3d23c1cc490dd0b44e 100644 (file)
@@ -62,8 +62,7 @@ int brcms_debugfs_attach(struct brcms_pub *drvr)
 
 void brcms_debugfs_detach(struct brcms_pub *drvr)
 {
-       if (!IS_ERR_OR_NULL(drvr->dbgfs_dir))
-               debugfs_remove_recursive(drvr->dbgfs_dir);
+       debugfs_remove_recursive(drvr->dbgfs_dir);
 }
 
 struct dentry *brcms_debugfs_get_devdir(struct brcms_pub *drvr)