Skip to contentSkip to conversation

nvme-rdma: fix an error code

PATCH In review Dan Carpenter 2 participants 3 messages Jul 13, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme-rdma: fix an error code

We accidentally return success when an error code was intended.

Fixes 711023071960 ('nvme-rdma: add a NVMe over Fabrics RDMA host driver')
drivers/nvme/host/rdma.c +1 -1
index 278551b..5208f16 100644
@@ -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;
#1 lore raw
Quoted 4 lines · Dan Carpenter

We accidentally return success when an error code was intended.

Fixes 711023071960 ('nvme-rdma: add a NVMe over Fabrics RDMA host driver')

This is already fixed, what branch are you looking at?

commit 458a9632ad7428e16e1feafb61aca33a11ac2f46

Author: Wei Yongjun <[email protected]>
Date:   Tue Jul 12 11:06:17 2016 +0000

nvme-rdma: fix the return value of nvme_rdma_reinit_request()

Signature · 1 line
Jens Axboe
#2 lore raw
Quoted 8 lines · Jens Axboe
Quoted 4 lines · Dan Carpenter

We accidentally return success when an error code was intended.

Fixes 711023071960 ('nvme-rdma: add a NVMe over Fabrics RDMA host driver')

This is already fixed, what branch are you looking at?

Thanks.

Linux-next, but I wait a day before sending them out so I can review them the next day. So yesterday's linux-next, I guess.

regards,
dan carpenter