lkml.org 
[lkml]   [2016]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] staging: lusture: obdclass: Remove unnecessary NULL check
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@gmail.com>
---
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
\
 
 \ /
  Last update: 2016-02-18 16:41    [W:0.026 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site