[PATCH] RAS/AMD/FMPM: Remove some dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Debugfs functions don't return NULL, they return error pointers.  Debugfs
functions are slightly unusual because they're not supposed to be checked
for errors in the normal case.  Delete these checks.

Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
---
 drivers/ras/amd/fmpm.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/ras/amd/fmpm.c b/drivers/ras/amd/fmpm.c
index 90de737fbc90..3cde1fe17a7a 100644
--- a/drivers/ras/amd/fmpm.c
+++ b/drivers/ras/amd/fmpm.c
@@ -956,12 +956,7 @@ static void setup_debugfs(void)
 		return;
 
 	fmpm_dfs_dir = debugfs_create_dir("fmpm", dfs);
-	if (!fmpm_dfs_dir)
-		return;
-
 	fmpm_dfs_entries = debugfs_create_file("entries", 0400, fmpm_dfs_dir, NULL, &fmpm_fops);
-	if (!fmpm_dfs_entries)
-		debugfs_remove(fmpm_dfs_dir);
 }
 
 static const struct x86_cpu_id fmpm_cpuids[] = {
-- 
2.45.2





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux