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

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
......@@ -818,8 +818,10 @@ 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment