Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: lirongqing <lirongqing@baidu.com>
Cc: Leon Romanovsky <leon@kernel.org>, linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/mlx5: Fix error propagation in __mlx5_ib_add
Date: Fri, 5 Jun 2026 14:03:38 -0300	[thread overview]
Message-ID: <20260605170338.GB2765215@nvidia.com> (raw)
In-Reply-To: <20260601095654.2178-1-lirongqing@baidu.com>

On Mon, Jun 01, 2026 at 05:56:54AM -0400, lirongqing wrote:
> From: Li RongQing <lirongqing@baidu.com>
> 
> __mlx5_ib_add() currently returns -ENOMEM on any stage initialization
> failure, losing the actual error code returned by the init function.
> This makes it impossible for callers to distinguish between different
> failure reasons (e.g. -EINVAL, -EIO, -EOPNOTSUPP) and leads to
> misleading error handling.
> 
> Fix it by returning the actual error code stored in 'err'.
> 
> Signed-off-by: Li RongQing <lirongqing@baidu.com>
> ---
>  drivers/infiniband/hw/mlx5/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason

      reply	other threads:[~2026-06-05 17:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01  9:56 [PATCH] RDMA/mlx5: Fix error propagation in __mlx5_ib_add lirongqing
2026-06-05 17:03 ` Jason Gunthorpe [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=20260605170338.GB2765215@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lirongqing@baidu.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