Skip to contentSkip to conversation

nvme: fix the nsid value to print in nvme_validate_or_alloc_ns

PATCH New Christoph Hellwig 1 participant 1 message Mar 12, 2021

Subsystems (2)
lore
Share & tools
lore

Christoph Hellwig

author maintainer
#0 lore raw

PATCH 1/1 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")
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/core.c +1 -1
index 82ad5eef9d0c30..a5653892d77392 100644
@@ -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);
Signature · 7 lines
2.30.1


_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme