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.yan...@zte.com.cn> CC: Alessandro Rubini <rub...@gnudd.com> CC: linux-kernel@vger.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