projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ec45b9
)
RDMA/cxgb4: Return proper errors in fastreg mr/pbl allocation
author
Steve Wise
<swise@opengridcomputing.com>
Thu, 20 May 2010 21:57:54 +0000
(16:57 -0500)
committer
Roland Dreier
<rolandd@cisco.com>
Tue, 25 May 2010 04:08:02 +0000
(21:08 -0700)
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/cxgb4/mem.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/infiniband/hw/cxgb4/mem.c
b/drivers/infiniband/hw/cxgb4/mem.c
index e54ff6d25691d2282cfdff4f46966cc83c8be617..993ed1fe7bf6868a6e49724965c97a349c86cef4 100644
(file)
--- a/
drivers/infiniband/hw/cxgb4/mem.c
+++ b/
drivers/infiniband/hw/cxgb4/mem.c
@@
-712,8
+712,10
@@
struct ib_mr *c4iw_alloc_fast_reg_mr(struct ib_pd *pd, int pbl_depth)
php = to_c4iw_pd(pd);
rhp = php->rhp;
mhp = kzalloc(sizeof(*mhp), GFP_KERNEL);
- if (!mhp)
+ if (!mhp) {
+ ret = -ENOMEM;
goto err;
+ }
mhp->rhp = rhp;
ret = alloc_pbl(mhp, pbl_depth);
@@
-730,8
+732,10
@@
struct ib_mr *c4iw_alloc_fast_reg_mr(struct ib_pd *pd, int pbl_depth)
mhp->attr.state = 1;
mmid = (stag) >> 8;
mhp->ibmr.rkey = mhp->ibmr.lkey = stag;
- if (insert_handle(rhp, &rhp->mmidr, mhp, mmid))
+ if (insert_handle(rhp, &rhp->mmidr, mhp, mmid)) {
+ ret = -ENOMEM;
goto err3;
+ }
PDBG("%s mmid 0x%x mhp %p stag 0x%x\n", __func__, mmid, mhp, stag);
return &(mhp->ibmr);