summaryrefslogtreecommitdiff
path: root/drivers/nvme/host/fc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/nvme/host/fc.c')
-rw-r--r--drivers/nvme/host/fc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index bae10a95b125..c7e6da2a6108 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -1937,7 +1937,7 @@ nvme_fc_complete_rq(struct request *rq)
if (nvme_req_needs_retry(rq, rq->errors)) {
rq->retries++;
nvme_requeue_req(rq);
- return;
+ goto put_ctrl;
}
if (blk_rq_is_passthrough(rq))
@@ -1946,9 +1946,10 @@ nvme_fc_complete_rq(struct request *rq)
error = nvme_error_status(rq->errors);
}
+ blk_mq_end_request(rq, error);
+put_ctrl:
nvme_fc_ctrl_put(ctrl);
- blk_mq_end_request(rq, error);
}
static const struct blk_mq_ops nvme_fc_mq_ops = {