Skip to content

Commit

Permalink
nvme: fix the nsid value to print in nvme_validate_or_alloc_ns
Browse files Browse the repository at this point in the history
commit f4f9fc2 upstream.

ns can be NULL at this point, and my move of the check from
the original patch by Chaitanya broke this.

Fixes: 0ec84df ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Christoph Hellwig authored and gregkh committed Mar 30, 2021
1 parent 05009ab commit 14a3924
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/core.c
Expand Up @@ -4072,7 +4072,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);
Expand Down

0 comments on commit 14a3924

Please sign in to comment.