diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index d85bcfe68b664477b826df091868d67001d81671..80cad5be07587f178a54d421b7785150836622c3 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3146,6 +3146,7 @@ static int nvme_init_ns_head(struct nvme_ns *ns, unsigned nsid, "IDs don't match for shared namespace %d\n", nsid); ret = -EINVAL; + nvme_put_ns_head(head); goto out_unlock; } }