mirror of https://gitee.com/openkylin/linux.git
RDMA/qedr: Missing error code in qedr_init_user_queue()
We should return -ENOMEM if the kzalloc() fails. We currently return
success.
Fixes: 69ad0e7fe8
("RDMA/qedr: Add support for iWARP in user space")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
69ad0e7fe8
commit
89fd2576cb
|
@ -818,8 +818,10 @@ static inline int qedr_init_user_queue(struct ib_ucontext *ib_ctx,
|
||||||
FW_PAGE_SHIFT);
|
FW_PAGE_SHIFT);
|
||||||
} else {
|
} else {
|
||||||
q->pbl_tbl = kzalloc(sizeof(*q->pbl_tbl), GFP_KERNEL);
|
q->pbl_tbl = kzalloc(sizeof(*q->pbl_tbl), GFP_KERNEL);
|
||||||
if (!q->pbl_tbl)
|
if (!q->pbl_tbl) {
|
||||||
|
rc = -ENOMEM;
|
||||||
goto err0;
|
goto err0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue