From: Dave Jiang <dave.jiang@intel.com>
To: Jackie Liu <liu.yun@linux.dev>, brett.creeley@amd.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fwctl/pds: propagate actual error code instead of hardcoded -ENOMEM
Date: Wed, 3 Jun 2026 09:53:49 -0700 [thread overview]
Message-ID: <192106d4-a716-4a72-be23-0b1cf69dc60f@intel.com> (raw)
In-Reply-To: <20260603012219.90498-1-liu.yun@linux.dev>
On 6/2/26 6:22 PM, Jackie Liu wrote:
> 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>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> 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;
> }
prev parent reply other threads:[~2026-06-03 16:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 1:22 Jackie Liu
2026-06-03 16:14 ` Creeley, Brett
2026-06-03 16:53 ` Dave Jiang [this message]
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=192106d4-a716-4a72-be23-0b1cf69dc60f@intel.com \
--to=dave.jiang@intel.com \
--cc=brett.creeley@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liu.yun@linux.dev \
/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®