From: Dan Carpenter <dan.carpenter@linaro.org>
To: Yazen Ghannam <Yazen.Ghannam@amd.com>
Cc: Tony Luck <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>,
linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH] RAS/AMD/FMPM: Remove some dead code
Date: Fri, 25 Oct 2024 10:08:34 +0300 [thread overview]
Message-ID: <6b914abf-b3ce-4baa-b4d7-f8da9a840a3f@stanley.mountain> (raw)
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@linaro.org>
---
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
next reply other threads:[~2024-10-25 7:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 7:08 Dan Carpenter [this message]
2024-10-25 13:56 ` Yazen Ghannam
2024-10-25 14:06 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6b914abf-b3ce-4baa-b4d7-f8da9a840a3f@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=Yazen.Ghannam@amd.com \
--cc=bp@alien8.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®