Commit f4f9fc29 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

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: 0ec84df4 ("nvme-core: check ctrl css before setting up zns")
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d4b64fd7
...@@ -4099,7 +4099,7 @@ static void nvme_validate_or_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid) ...@@ -4099,7 +4099,7 @@ static void nvme_validate_or_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
if (!nvme_multi_css(ctrl)) { if (!nvme_multi_css(ctrl)) {
dev_warn(ctrl->device, dev_warn(ctrl->device,
"command set not reported for nsid: %d\n", "command set not reported for nsid: %d\n",
ns->head->ns_id); nsid);
break; break;
} }
nvme_alloc_ns(ctrl, nsid, &ids); nvme_alloc_ns(ctrl, nsid, &ids);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment