summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/core.c
diff options
context:
space:
mode:
authorJoel Granados <j.granados@samsung.com>2022-11-02 18:17:08 +0100
committerChristoph Hellwig <hch@lst.de>2022-11-16 08:36:37 +0100
commitbcaf434b8f04e1ee82a8b1e1bce0de99fbff67fa (patch)
treed121851fc23c390c424ba5e0e6ad84fb9118f4cc /drivers/nvme/host/core.c
parent811f4de0344d48a33a94d5c7d31a0ef0490f5701 (diff)
downloadlinux-bcaf434b8f04e1ee82a8b1e1bce0de99fbff67fa.tar.bz2
nvme: return err on nvme_init_non_mdts_limits fail
In nvme_init_non_mdts_limits function we were returning 0 when kzalloc failed; it now returns -ENOMEM. Fixes: 5befc7c26e5a ("nvme: implement non-mdts command limits") Signed-off-by: Joel Granados <j.granados@samsung.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/core.c')
-rw-r--r--drivers/nvme/host/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index cba45bad689b..ca4d40996ac1 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3078,7 +3078,7 @@ static int nvme_init_non_mdts_limits(struct nvme_ctrl *ctrl)
id = kzalloc(sizeof(*id), GFP_KERNEL);
if (!id)
- return 0;
+ return -ENOMEM;
c.identify.opcode = nvme_admin_identify;
c.identify.cns = NVME_ID_CNS_CS_CTRL;