All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adit Ranadive <aditr@vmware.com>
To: Qinglang Miao <miaoqinglang@huawei.com>,
	VMware PV-Drivers <pv-drivers@vmware.com>,
	Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RDMA/pvrdma: fix missing kfree in pvrdma_register_device
Date: Wed, 11 Nov 2020 14:20:05 -0800	[thread overview]
Message-ID: <91aff9c5-ece0-6c75-0803-de92e491a2d6@vmware.com> (raw)
In-Reply-To: <20201111032202.17925-1-miaoqinglang@huawei.com>

On 11/10/20 7:22 PM, Qinglang Miao wrote:
> Fix missing kfree in pvrdma_register_device() when fails
> to do ib_device_set_netdev.
> 
> Fixes: 4b38da75e089 ("RDMA/drivers: Convert easy drivers to use ib_device_set_netdev()")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
>  drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
> index fa2a3fa0c3e4..f71d99946bed 100644
> --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
> +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
> @@ -266,7 +266,7 @@ static int pvrdma_register_device(struct pvrdma_dev *dev)
>  	}
>  	ret = ib_device_set_netdev(&dev->ib_dev, dev->netdev, 1);
>  	if (ret)
> -		return ret;
> +		goto err_qp_free;

Thanks. This should be 'goto err_srq_free'.

>  	spin_lock_init(&dev->srq_tbl_lock);
>  	rdma_set_device_sysfs_group(&dev->ib_dev, &pvrdma_attr_group);
>  
> 

  reply	other threads:[~2020-11-11 22:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11  3:22 [PATCH] RDMA/pvrdma: fix missing kfree in pvrdma_register_device Qinglang Miao
2020-11-11 22:20 ` Adit Ranadive [this message]
2020-11-12 17:06 ` 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=91aff9c5-ece0-6c75-0803-de92e491a2d6@vmware.com \
    --to=aditr@vmware.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=miaoqinglang@huawei.com \
    --cc=pv-drivers@vmware.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 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.