提交 89fd2576 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册