]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mic: Remove unneeded NULL check
authorXu Wang <vulab@iscas.ac.cn>
Tue, 7 Jan 2020 10:00:35 +0000 (10:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jan 2020 14:30:35 +0000 (15:30 +0100)
debugfs_remove_recursive will do NULL check, so remove
the redundant null check.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Link: https://lore.kernel.org/r/1578391235-603-1-git-send-email-vulab@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mic/card/mic_debugfs.c
drivers/misc/mic/cosm/cosm_debugfs.c
drivers/misc/mic/host/mic_debugfs.c

index 3ee3d24026340bba97a5c565832c359c5f655b4c..b58608829b180e3b1dbb45afec9da42a26bd61f1 100644 (file)
@@ -65,9 +65,6 @@ void __init mic_create_card_debug_dir(struct mic_driver *mdrv)
  */
 void mic_delete_card_debug_dir(struct mic_driver *mdrv)
 {
-       if (!mdrv->dbg_dir)
-               return;
-
        debugfs_remove_recursive(mdrv->dbg_dir);
 }
 
index 2fc9f4bf70014964aa07e95473231e0e1b53a518..68a731fd86deea4993c988a0caf18c0af4aa6341 100644 (file)
@@ -102,9 +102,6 @@ void cosm_create_debug_dir(struct cosm_device *cdev)
 
 void cosm_delete_debug_dir(struct cosm_device *cdev)
 {
-       if (!cdev->dbg_dir)
-               return;
-
        debugfs_remove_recursive(cdev->dbg_dir);
 }
 
index 8a8e4167750174a8d7ea3a51d736fa57974d170b..ab0db7a2ac8c2e984a512e1557343d9139388bb0 100644 (file)
@@ -129,9 +129,6 @@ void mic_create_debug_dir(struct mic_device *mdev)
  */
 void mic_delete_debug_dir(struct mic_device *mdev)
 {
-       if (!mdev->dbg_dir)
-               return;
-
        debugfs_remove_recursive(mdev->dbg_dir);
 }