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: 0ec84df495 ("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>
This commit is contained in:
Christoph Hellwig 2021-03-12 20:55:36 +01:00 committed by Jens Axboe
parent d4b64fd702
commit f4f9fc29e5
1 changed files with 1 additions and 1 deletions

View File

@ -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);