projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf294e8
)
nvme-rdma: fix the return value of nvme_rdma_reinit_request()
author
Wei Yongjun
<yongjun_wei@trendmicro.com.cn>
Tue, 12 Jul 2016 11:06:17 +0000
(11:06 +0000)
committer
Jens Axboe
<axboe@fb.com>
Tue, 12 Jul 2016 15:27:03 +0000
(08:27 -0700)
PTR_ERR should be applied before its argument is reassigned, otherwise the
return value will be set to 0, not error code.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Jay Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/rdma.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/nvme/host/rdma.c
b/drivers/nvme/host/rdma.c
index 278551bcd5c71f9701c105e1f0277e994c176b49..5208f16a6815530c0f479dd7e4560046c2cf77b3 100644
(file)
--- a/
drivers/nvme/host/rdma.c
+++ b/
drivers/nvme/host/rdma.c
@@
-299,8
+299,8
@@
static int nvme_rdma_reinit_request(void *data, struct request *rq)
req->mr = ib_alloc_mr(dev->pd, IB_MR_TYPE_MEM_REG,
ctrl->max_fr_pages);
if (IS_ERR(req->mr)) {
- req->mr = NULL;
ret = PTR_ERR(req->mr);
+ req->mr = NULL;
}
req->need_inval = false;