Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89fd2576 authored by Dan Carpenter's avatar Dan Carpenter Committed by Doug Ledford
Browse files

RDMA/qedr: Missing error code in qedr_init_user_queue()



We should return -ENOMEM if the kzalloc() fails.  We currently return
success.

Fixes: 69ad0e7f ("RDMA/qedr: Add support for iWARP in user space")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 69ad0e7f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -818,9 +818,11 @@ static inline int qedr_init_user_queue(struct ib_ucontext *ib_ctx,
				   FW_PAGE_SHIFT);
	} else {
		q->pbl_tbl = kzalloc(sizeof(*q->pbl_tbl), GFP_KERNEL);
		if (!q->pbl_tbl)
		if (!q->pbl_tbl) {
			rc = -ENOMEM;
			goto err0;
		}
	}

	return 0;