From: Jon Hunter <jonathanh@nvidia.com>
To: Thierry Reding <thierry.reding@kernel.org>
Cc: <linux-tegra@vger.kernel.org>, Jon Hunter <jonathanh@nvidia.com>
Subject: [PATCH V2 1/2] firmware: tegra: bpmp: Propagate debugfs errors
Date: Fri, 29 May 2026 16:08:45 +0100 [thread overview]
Message-ID: <20260529150847.70545-1-jonathanh@nvidia.com> (raw)
The Tegra BPMP debugfs code returns -ENOMEM for most cases where calls
to debugfs_create_dir() or debugfs_create_file() fail. These debugfs
functions return an ERR_PTR with the actual error code on failure.
Therefore, update the Tegra BPMP debugfs code to propagate the actual
error code on failure.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
Changes since V1:
- Added this patch for V2
drivers/firmware/tegra/bpmp-debugfs.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/firmware/tegra/bpmp-debugfs.c b/drivers/firmware/tegra/bpmp-debugfs.c
index 4221fed70ad4..29037e2b3158 100644
--- a/drivers/firmware/tegra/bpmp-debugfs.c
+++ b/drivers/firmware/tegra/bpmp-debugfs.c
@@ -468,7 +468,7 @@ static int bpmp_populate_debugfs_inband(struct tegra_bpmp *bpmp,
dentry = debugfs_create_file(name, mode, parent, bpmp,
&bpmp_debug_fops);
if (IS_ERR(dentry)) {
- err = -ENOMEM;
+ err = PTR_ERR(dentry);
goto out;
}
}
@@ -719,7 +719,7 @@ static int bpmp_populate_dir(struct tegra_bpmp *bpmp, struct seqbuf *seqbuf,
if (t & DEBUGFS_S_ISDIR) {
dentry = debugfs_create_dir(name, parent);
if (IS_ERR(dentry))
- return -ENOMEM;
+ return PTR_ERR(dentry);
err = bpmp_populate_dir(bpmp, seqbuf, dentry, depth+1);
if (err < 0)
return err;
@@ -732,7 +732,7 @@ static int bpmp_populate_dir(struct tegra_bpmp *bpmp, struct seqbuf *seqbuf,
parent, bpmp,
&debugfs_fops);
if (IS_ERR(dentry))
- return -ENOMEM;
+ return PTR_ERR(dentry);
}
}
@@ -782,11 +782,11 @@ int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp)
root = debugfs_create_dir("bpmp", NULL);
if (IS_ERR(root))
- return -ENOMEM;
+ return PTR_ERR(root);
bpmp->debugfs_mirror = debugfs_create_dir("debug", root);
if (IS_ERR(bpmp->debugfs_mirror)) {
- err = -ENOMEM;
+ err = PTR_ERR(bpmp->debugfs_mirror);
goto out;
}
--
2.43.0
next reply other threads:[~2026-05-29 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 15:08 Jon Hunter [this message]
2026-05-29 15:08 ` [PATCH V2 2/2] firmware: tegra: bpmp: Add support for multi-socket platforms Jon Hunter
2026-05-29 15:50 ` Jon Hunter
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=20260529150847.70545-1-jonathanh@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@kernel.org \
/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