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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230423122932.31274-1-u202112092@hust.edu.cn>
Date:   Sun, 23 Apr 2023 20:29:32 +0800
From:   Ruliang Lin <u202112092@...t.edu.cn>
To:     Tony Luck <tony.luck@...el.com>, Borislav Petkov <bp@...en8.de>,
        Ingo Molnar <mingo@...nel.org>
Cc:     hust-os-kernel-patches@...glegroups.com,
        Ruliang Lin <u202112092@...t.edu.cn>,
        Dongliang Mu <dzm91@...t.edu.cn>, Borislav Petkov <bp@...e.de>,
        linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] drivers: ras: cec: return value check of `d`

Smatch complains that:
create_debugfs_nodes() warn: 'd' is an error pointer or valid

According to the documentation of the debugfs_create_dir() function, 
there is no need to check the return value of this function.
Just delete the dead code.

Fixes: 011d82611172 ("RAS: Add a Corrected Errors Collector")
Signed-off-by: Ruliang Lin <u202112092@...t.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@...t.edu.cn>
---
 drivers/ras/cec.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c
index 321af498ee11..d2a03f94cbfe 100644
--- a/drivers/ras/cec.c
+++ b/drivers/ras/cec.c
@@ -483,10 +483,6 @@ static int __init create_debugfs_nodes(void)
 	struct dentry *d, *pfn, *decay, *count, *array;
 
 	d = debugfs_create_dir("cec", ras_debugfs_dir);
-	if (!d) {
-		pr_warn("Error creating cec debugfs node!\n");
-		return -1;
-	}
 
 	decay = debugfs_create_file("decay_interval", S_IRUSR | S_IWUSR, d,
 				    &decay_interval, &decay_interval_ops);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ