Commit e2f9d739 authored by Xu Wang's avatar Xu Wang Committed by Greg Kroah-Hartman

mic: Remove unneeded NULL check

debugfs_remove_recursive will do NULL check, so remove
the redundant null check.
Signed-off-by: default avatarXu Wang <vulab@iscas.ac.cn>
Reviewed-by: default avatarAshutosh Dixit <ashutosh.dixit@intel.com>
Link: https://lore.kernel.org/r/1578391235-603-1-git-send-email-vulab@iscas.ac.cnSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent caf82f72
...@@ -65,9 +65,6 @@ void __init mic_create_card_debug_dir(struct mic_driver *mdrv) ...@@ -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) void mic_delete_card_debug_dir(struct mic_driver *mdrv)
{ {
if (!mdrv->dbg_dir)
return;
debugfs_remove_recursive(mdrv->dbg_dir); debugfs_remove_recursive(mdrv->dbg_dir);
} }
......
...@@ -102,9 +102,6 @@ void cosm_create_debug_dir(struct cosm_device *cdev) ...@@ -102,9 +102,6 @@ void cosm_create_debug_dir(struct cosm_device *cdev)
void cosm_delete_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); debugfs_remove_recursive(cdev->dbg_dir);
} }
......
...@@ -129,9 +129,6 @@ void mic_create_debug_dir(struct mic_device *mdev) ...@@ -129,9 +129,6 @@ void mic_create_debug_dir(struct mic_device *mdev)
*/ */
void mic_delete_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); debugfs_remove_recursive(mdev->dbg_dir);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment