summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/nvme/host/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 15b9e60be204..f2dc89dd2e1c 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3503,6 +3503,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;
}
}