From ef658fc2a6809b42dd7002229fd174a9a1645707 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 15 Oct 2015 09:49:57 -0600 Subject: [PATCH] NVMe: initialize error to '0' Reported-by: Keith Busch Fixes: 1951feae88c5 ("nvme: use an integer value to Linux errno values") Signed-off-by: Jens Axboe --- drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index f73c574d59f5..22d83752ae87 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -607,7 +607,7 @@ static void req_completion(struct nvme_queue *nvmeq, void *ctx, struct request *req = iod_get_private(iod); struct nvme_cmd_info *cmd_rq = blk_mq_rq_to_pdu(req); u16 status = le16_to_cpup(&cqe->status) >> 1; - int error; + int error = 0; if (unlikely(status)) { if (!(status & NVME_SC_DNR || blk_noretry_request(req)) -- GitLab