NULL check before the debugfs_remove_recursive function is not needed. This was detected using scripts/coccinelle/free/ifnullfree.cocci Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@xxxxxxxxx> --- drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c index 1913f3e..2045621 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c @@ -454,8 +454,7 @@ out: int class_procfs_clean(void) { - if (debugfs_lustre_root != NULL) - debugfs_remove_recursive(debugfs_lustre_root); + debugfs_remove_recursive(debugfs_lustre_root); debugfs_lustre_root = NULL; -- 2.1.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel