summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2015-10-15 09:49:57 -0600
committerJens Axboe <axboe@fb.com>2015-10-15 09:49:57 -0600
commitef658fc2a6809b42dd7002229fd174a9a1645707 (patch)
treeeeb7ffb245ab211458cc03be096c83c440c24d67
parent1951feae88c5a39105a704188ccf910faf1d0c50 (diff)
downloadop-kernel-dev-ef658fc2a6809b42dd7002229fd174a9a1645707.zip
op-kernel-dev-ef658fc2a6809b42dd7002229fd174a9a1645707.tar.gz
NVMe: initialize error to '0'
Reported-by: Keith Busch <keith.busch@intel.com> Fixes: 1951feae88c5 ("nvme: use an integer value to Linux errno values") Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--drivers/nvme/host/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index f73c574..22d8375 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))
OpenPOWER on IntegriCloud