mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Reviewed-by: Jay Freyensee <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
bf294e833b
commit
458a9632ad
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue