diff options
author | Christoph Hellwig <hch@lst.de> | 2021-03-12 22:55:36 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-30 15:32:08 +0300 |
commit | f12d05f70282df0af59ee891f5cbfe147c1d9a41 (patch) | |
tree | ed8e75da902d8fa7f04deed95477e05fd1a86dd1 /drivers/nvme | |
parent | 36478a9ec5afd4efd031527d0371bf8f61e5aa91 (diff) | |
download | linux-f12d05f70282df0af59ee891f5cbfe147c1d9a41.tar.xz |
nvme: fix the nsid value to print in nvme_validate_or_alloc_ns
commit f4f9fc29e56b6fa9d7fa65ec51d3c82aff99c99b upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 140f19cbe73a..610d2bc43ea2 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -4022,7 +4022,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); |