lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ