linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maor Gottlieb <maorg@nvidia.com>
To: Jing Xiangfeng <jingxiangfeng@huawei.com>, <dledford@redhat.com>,
	<jgg@ziepe.ca>, <leon@kernel.org>, <maorg@mellanox.com>,
	<parav@mellanox.com>, <galpress@amazon.com>, <monis@mellanox.com>,
	<chuck.lever@oracle.com>, <maxg@mellanox.com>
Cc: <linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] RDMA/core: Fix error return in _ib_modify_qp()
Date: Sun, 18 Oct 2020 13:16:09 +0300	[thread overview]
Message-ID: <fbca7f4d-aad5-8b0b-89fc-f87caf873828@nvidia.com> (raw)
In-Reply-To: <20201016075845.129562-1-jingxiangfeng@huawei.com>


On 10/16/2020 10:58 AM, Jing Xiangfeng wrote:
> Fix to return error code PTR_ERR() from the error handling case instead of
> 0.
>
> Fixes: 51aab12631dd ("RDMA/core: Get xmit slave for LAG")
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
> ---
>   drivers/infiniband/core/verbs.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
> index 307886737646..bf63c7561e8c 100644
> --- a/drivers/infiniband/core/verbs.c
> +++ b/drivers/infiniband/core/verbs.c
> @@ -1685,8 +1685,10 @@ static int _ib_modify_qp(struct ib_qp *qp, struct ib_qp_attr *attr,
>   			slave = rdma_lag_get_ah_roce_slave(qp->device,
>   							   &attr->ah_attr,
>   							   GFP_KERNEL);
> -			if (IS_ERR(slave))
> +			if (IS_ERR(slave)) {
> +				ret = PTR_ERR(slave);
>   				goto out_av;
> +			}
>   			attr->xmit_slave = slave;
>   		}
>   	}

Looks good,
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>


  reply	other threads:[~2020-10-18 10:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16  7:58 [PATCH] RDMA/core: Fix error return in _ib_modify_qp() Jing Xiangfeng
2020-10-18 10:16 ` Maor Gottlieb [this message]
2020-10-28 13:33 ` Jason Gunthorpe

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=fbca7f4d-aad5-8b0b-89fc-f87caf873828@nvidia.com \
    --to=maorg@nvidia.com \
    --cc=chuck.lever@oracle.com \
    --cc=dledford@redhat.com \
    --cc=galpress@amazon.com \
    --cc=jgg@ziepe.ca \
    --cc=jingxiangfeng@huawei.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maorg@mellanox.com \
    --cc=maxg@mellanox.com \
    --cc=monis@mellanox.com \
    --cc=parav@mellanox.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;
as well as URLs for NNTP newsgroup(s).