public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: YanLong Dai <dyl_wlc@163.com>
Cc: selvin.xavier@broadcom.com, kalesh-anakkur.purayil@broadcom.com,
	jgg@ziepe.ca, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org, daiyanlong <daiyanlong@kylinos.cn>
Subject: Re: [PATCH] drivers: fix the exception was not returned
Date: Tue, 16 Sep 2025 16:49:15 +0300	[thread overview]
Message-ID: <20250916134915.GC82444@unreal> (raw)
In-Reply-To: <20250916091154.11421-1-dyl_wlc@163.com>

On Tue, Sep 16, 2025 at 05:11:54PM +0800, YanLong Dai wrote:
> From: daiyanlong <daiyanlong@kylinos.cn>
> 
> The return value rc of bnxt_qplib_destroy_qp is abnormal and no return

And what is wrong with that? This is expected behavior - do not fail if
destroy fails.

Thanks

> 
> Signed-off-by: daiyanlong <daiyanlong@kylinos.cn>
> ---
>  drivers/infiniband/hw/bnxt_re/ib_verbs.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> index 260dc67b8b87..d52cfb50b1b8 100644
> --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> @@ -971,8 +971,10 @@ int bnxt_re_destroy_qp(struct ib_qp *ib_qp, struct ib_udata *udata)
>  	bnxt_qplib_flush_cqn_wq(&qp->qplib_qp);
>  
>  	rc = bnxt_qplib_destroy_qp(&rdev->qplib_res, &qp->qplib_qp);
> -	if (rc)
> +	if (rc) {
>  		ibdev_err(&rdev->ibdev, "Failed to destroy HW QP");
> +		return rc;
> +	}
>  
>  	if (rdma_is_kernel_res(&qp->ib_qp.res)) {
>  		flags = bnxt_re_lock_cqs(qp);
> -- 
> 2.43.0
> 

  reply	other threads:[~2025-09-16 13:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-16  9:11 [PATCH] drivers: fix the exception was not returned YanLong Dai
2025-09-16 13:49 ` Leon Romanovsky [this message]
2025-09-17  2:15   ` YanLong Dai
2025-09-17 11:35   ` [PATCH] drivers: fix the potential memory leak in bnxt_re_destroy_gsi_sqp() YanLong Dai
2025-09-18 10:02     ` Leon Romanovsky
2025-09-17 12:13   ` [PATCH v2] " YanLong Dai
2025-09-17 12:39   ` [PATCH v3] " YanLong Dai
2025-09-17 12:40   ` YanLong Dai

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=20250916134915.GC82444@unreal \
    --to=leon@kernel.org \
    --cc=daiyanlong@kylinos.cn \
    --cc=dyl_wlc@163.com \
    --cc=jgg@ziepe.ca \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=selvin.xavier@broadcom.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