[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20181206011917.32154-1-wen.yang99@zte.com.cn>
Date: Thu, 6 Dec 2018 09:19:17 +0800
From: Wen Yang <wen.yang99@....com.cn>
To: Alessandro Rubini <rubini@...dd.com>
Cc: linux-kernel@...r.kernel.org, zhong.weidong@....com.cn,
Wen Yang <wen.yang99@....com.cn>
Subject: [PATCH] drivers/fmc: Remove unnecessary NULL check before debugfs_remove_recursive
debugfs_remove_recursive() accepts a NULL parameter and returns
immediately, there's no need for a NULL check in the caller.
This issue was detected with the help of Coccinelle.
Signed-off-by: Wen Yang <wen.yang99@....com.cn>
CC: Alessandro Rubini <rubini@...dd.com>
CC: linux-kernel@...r.kernel.org
---
drivers/fmc/fmc-debug.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/fmc/fmc-debug.c b/drivers/fmc/fmc-debug.c
index 32930722770c..ab868a35e221 100644
--- a/drivers/fmc/fmc-debug.c
+++ b/drivers/fmc/fmc-debug.c
@@ -168,6 +168,5 @@ int fmc_debug_init(struct fmc_device *fmc)
void fmc_debug_exit(struct fmc_device *fmc)
{
- if (fmc->dbg_dir)
- debugfs_remove_recursive(fmc->dbg_dir);
+ debugfs_remove_recursive(fmc->dbg_dir);
}
--
2.19.1
Powered by blists - more mailing lists