All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] RDMA/mlx5: Fix missing assignment of rc when calling mlx5_ib_dereg_mr
Date: Wed, 17 Mar 2021 19:04:14 +0200	[thread overview]
Message-ID: <YFI2jt/nTpn//Zc0@unreal> (raw)
In-Reply-To: <20210316095117.17089-1-colin.king@canonical.com>

On Tue, Mar 16, 2021 at 09:51:17AM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The assignment of the return code to rc when calling mlx5_ib_dereg_mr is
> missing and there is an error check on an uninitialized rc. Fix this by
> adding in the assignment.
>
> Addresses-Coverity: ("Uninitialized scalar variable")
> Fixes: e6fb246ccafb ("RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr()")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/infiniband/hw/mlx5/mr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

It was already sent, thanks.
https://lore.kernel.org/linux-rdma/20210314082250.10143-1-leon@kernel.org/

>
> diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
> index 86ffc7e5ef96..9dcb9fb4eeaa 100644
> --- a/drivers/infiniband/hw/mlx5/mr.c
> +++ b/drivers/infiniband/hw/mlx5/mr.c
> @@ -1946,7 +1946,7 @@ int mlx5_ib_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata)
>  			mr->mtt_mr = NULL;
>  		}
>  		if (mr->klm_mr) {
> -			mlx5_ib_dereg_mr(&mr->klm_mr->ibmr, NULL);
> +			rc = mlx5_ib_dereg_mr(&mr->klm_mr->ibmr, NULL);
>  			if (rc)
>  				return rc;
>  			mr->klm_mr = NULL;
> --
> 2.30.2
>

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16  9:51 [PATCH][next] RDMA/mlx5: Fix missing assignment of rc when calling mlx5_ib_dereg_mr Colin King
2021-03-17 17:04 ` Leon Romanovsky [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=YFI2jt/nTpn//Zc0@unreal \
    --to=leon@kernel.org \
    --cc=colin.king@canonical.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.