diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2016-07-12 11:06:17 +0000 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-07-12 08:27:03 -0700 |
commit | 458a9632ad7428e16e1feafb61aca33a11ac2f46 (patch) | |
tree | 485fa0491663dbcf92bb76d354547b9ab509da40 /drivers/nvme | |
parent | bf294e833b3e670450cdc013242d45a4d2b8d395 (diff) |
nvme-rdma: fix the return value of nvme_rdma_reinit_request()
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>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/rdma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 278551bcd5c7..5208f16a6815 100644 --- 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; |