Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mic: Remove unneeded NULL check

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>

authored by

Xu Wang and committed by
Greg Kroah-Hartman
e2f9d739 caf82f72

-9
-3
drivers/misc/mic/card/mic_debugfs.c
··· 65 65 */ 66 66 void mic_delete_card_debug_dir(struct mic_driver *mdrv) 67 67 { 68 - if (!mdrv->dbg_dir) 69 - return; 70 - 71 68 debugfs_remove_recursive(mdrv->dbg_dir); 72 69 } 73 70
-3
drivers/misc/mic/cosm/cosm_debugfs.c
··· 102 102 103 103 void cosm_delete_debug_dir(struct cosm_device *cdev) 104 104 { 105 - if (!cdev->dbg_dir) 106 - return; 107 - 108 105 debugfs_remove_recursive(cdev->dbg_dir); 109 106 } 110 107
-3
drivers/misc/mic/host/mic_debugfs.c
··· 129 129 */ 130 130 void mic_delete_debug_dir(struct mic_device *mdev) 131 131 { 132 - if (!mdev->dbg_dir) 133 - return; 134 - 135 132 debugfs_remove_recursive(mdev->dbg_dir); 136 133 } 137 134