[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32E1700B9017364D9B60AED9960492BC70C11891@fmsmsx120.amr.corp.intel.com>
Date: Fri, 4 Jan 2019 18:39:50 +0000
From: "Marciniszyn, Mike" <mike.marciniszyn@...el.com>
To: YueHaibing <yuehaibing@...wei.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"Dalessandro, Dennis" <dennis.dalessandro@...el.com>,
"dledford@...hat.com" <dledford@...hat.com>,
"jgg@...pe.ca" <jgg@...pe.ca>
Subject: RE: [PATCH -next] IB/qib: Add missing err handle for
qib_user_sdma_rb_insert
> diff --git a/drivers/infiniband/hw/qib/qib_user_sdma.c
> b/drivers/infiniband/hw/qib/qib_user_sdma.c
> index 31c523b..e87c0a7 100644
> --- a/drivers/infiniband/hw/qib/qib_user_sdma.c
> +++ b/drivers/infiniband/hw/qib/qib_user_sdma.c
> @@ -237,6 +237,8 @@ qib_user_sdma_queue_create(struct device *dev,
> int unit, int ctxt, int sctxt)
>
> ret = qib_user_sdma_rb_insert(&qib_user_sdma_rb_root,
> sdma_rb_node);
> + if (ret == 0)
> + goto err_rb;
> }
> pq->sdma_rb_node = sdma_rb_node;
>
> --
> 2.7.0
>
Thanks!
This patch is ok.
The NULL returned from this routine will result in an error return up to PSM which will fail.
The bail branch will do the necessary cleanup, including freeing the node that couldn't be added.
Acked-by: Mike Marciniszyn <mike.marciniszyn@...el.com>
Powered by blists - more mailing lists