From: Jackie Liu <liu.yun@linux.dev>
To: brett.creeley@amd.com, dave.jiang@intel.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] fwctl/pds: propagate actual error code instead of hardcoded -ENOMEM
Date: Wed, 3 Jun 2026 09:22:19 +0800 [thread overview]
Message-ID: <20260603012219.90498-1-liu.yun@linux.dev> (raw)
From: Jackie Liu <liuyun01@kylinos.cn>
When pdsfc_get_operations() fails in pdsfc_validate_rpc(), the
function hardcodes the return value to -ENOMEM regardless of the
actual failure. pdsfc_get_operations() can return various errors
from the adminq command (e.g. -ETIMEDOUT, -EIO, -ENODEV) or from
DMA mapping failure (-ENOMEM). Propagate the actual error via
PTR_ERR(operations) so userspace and debugging tools see the correct
failure reason.
Fixes: 92c66ee829b9 ("pds_fwctl: add rpc and query support")
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
drivers/fwctl/pds/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/fwctl/pds/main.c b/drivers/fwctl/pds/main.c
index 68fe254dd10a..a4e80cfa3c50 100644
--- a/drivers/fwctl/pds/main.c
+++ b/drivers/fwctl/pds/main.c
@@ -325,7 +325,7 @@ static int pdsfc_validate_rpc(struct pdsfc_dev *pdsfc,
rpc->in.ep);
if (IS_ERR(operations)) {
mutex_unlock(&ep_info->lock);
- return -ENOMEM;
+ return PTR_ERR(operations);
}
ep_info->operations = operations;
}
--
2.54.0
next reply other threads:[~2026-06-03 1:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 1:22 Jackie Liu [this message]
2026-06-03 16:14 ` Creeley, Brett
2026-06-03 16:53 ` Dave Jiang
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=20260603012219.90498-1-liu.yun@linux.dev \
--to=liu.yun@linux.dev \
--cc=brett.creeley@amd.com \
--cc=dave.jiang@intel.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®