summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-03-12 22:55:36 +0300
committerJens Axboe <axboe@kernel.dk>2021-03-12 23:17:45 +0300
commitf4f9fc29e56b6fa9d7fa65ec51d3c82aff99c99b (patch)
tree170f6d1870ec3996b35e2c02677b3cac70d9e585 /drivers/nvme
parentd4b64fd702cf08dfcac9e294a10884de51c6af63 (diff)
downloadlinux-f4f9fc29e56b6fa9d7fa65ec51d3c82aff99c99b.tar.xz
nvme: fix the nsid value to print in nvme_validate_or_alloc_ns
ns can be NULL at this point, and my move of the check from the original patch by Chaitanya broke this. Fixes: 0ec84df4953b ("nvme-core: check ctrl css before setting up zns") Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 82ad5eef9d0c..a5653892d773 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -4099,7 +4099,7 @@ static void nvme_validate_or_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
if (!nvme_multi_css(ctrl)) {
dev_warn(ctrl->device,
"command set not reported for nsid: %d\n",
- ns->head->ns_id);
+ nsid);
break;
}
nvme_alloc_ns(ctrl, nsid, &ids);