linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] IB/qib: Add missing err handle for qib_user_sdma_rb_insert
@ 2018-12-21  2:19 YueHaibing
  2019-01-02 17:12 ` Jason Gunthorpe
  2019-01-04 18:39 ` Marciniszyn, Mike
  0 siblings, 2 replies; 9+ messages in thread
From: YueHaibing @ 2018-12-21  2:19 UTC (permalink / raw)
  To: dennis.dalessandro, mike.marciniszyn, dledford, jgg
  Cc: linux-kernel, linux-rdma, YueHaibing

It should goto err handle if qib_user_sdma_rb_insert fails,
other than success return.

Fixes: 67810e8c3c01 ("RDMA/qib: Remove all occurrences of BUG_ON()")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/infiniband/hw/qib/qib_user_sdma.c | 2 ++
 1 file changed, 2 insertions(+)

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



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-01-04 22:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-21  2:19 [PATCH -next] IB/qib: Add missing err handle for qib_user_sdma_rb_insert YueHaibing
2019-01-02 17:12 ` Jason Gunthorpe
2019-01-02 18:40   ` Leon Romanovsky
2019-01-02 19:07     ` Jason Gunthorpe
2019-01-02 19:22       ` Leon Romanovsky
2019-01-04  6:08         ` YueHaibing
2019-01-03  2:05       ` YueHaibing
2019-01-04 18:39 ` Marciniszyn, Mike
2019-01-04 22:38   ` Jason Gunthorpe

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).