diff options
author | Xu Wang <vulab@iscas.ac.cn> | 2020-01-07 11:00:35 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-14 15:30:35 +0100 |
commit | e2f9d739b2877ddd43bb3132f837c80ed5430e39 (patch) | |
tree | f31d94393f44cb91a581aa03496f474d0dd91828 /drivers/misc | |
parent | visorbus: fix uninitialized variable access (diff) | |
download | linux-e2f9d739b2877ddd43bb3132f837c80ed5430e39.tar.xz linux-e2f9d739b2877ddd43bb3132f837c80ed5430e39.zip |
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/mic/card/mic_debugfs.c | 3 | ||||
-rw-r--r-- | drivers/misc/mic/cosm/cosm_debugfs.c | 3 | ||||
-rw-r--r-- | drivers/misc/mic/host/mic_debugfs.c | 3 |
3 files changed, 0 insertions, 9 deletions
diff --git a/drivers/misc/mic/card/mic_debugfs.c b/drivers/misc/mic/card/mic_debugfs.c index 3ee3d2402634..b58608829b18 100644 --- a/drivers/misc/mic/card/mic_debugfs.c +++ b/drivers/misc/mic/card/mic_debugfs.c @@ -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); } diff --git a/drivers/misc/mic/cosm/cosm_debugfs.c b/drivers/misc/mic/cosm/cosm_debugfs.c index 2fc9f4bf7001..68a731fd86de 100644 --- a/drivers/misc/mic/cosm/cosm_debugfs.c +++ b/drivers/misc/mic/cosm/cosm_debugfs.c @@ -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); } diff --git a/drivers/misc/mic/host/mic_debugfs.c b/drivers/misc/mic/host/mic_debugfs.c index 8a8e41677501..ab0db7a2ac8c 100644 --- a/drivers/misc/mic/host/mic_debugfs.c +++ b/drivers/misc/mic/host/mic_debugfs.c @@ -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); } |