]> Git Repo - linux.git/commitdiff
RDMA/qedr: Missing error code in qedr_init_user_queue()
authorDan Carpenter <[email protected]>
Fri, 25 Aug 2017 08:18:39 +0000 (11:18 +0300)
committerDoug Ledford <[email protected]>
Tue, 29 Aug 2017 00:34:40 +0000 (20:34 -0400)
We should return -ENOMEM if the kzalloc() fails.  We currently return
success.

Fixes: 69ad0e7fe845 ("RDMA/qedr: Add support for iWARP in user space")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
drivers/infiniband/hw/qedr/verbs.c

index 1c995c6da8d838701424f4f0edf983140e08f241..249b560a32d7351a137ce7fb4075fb76e330b448 100644 (file)
@@ -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;
This page took 0.069777 seconds and 4 git commands to generate.