diff options
author | Joel Granados <j.granados@samsung.com> | 2022-11-02 20:17:08 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2022-11-16 10:36:37 +0300 |
commit | bcaf434b8f04e1ee82a8b1e1bce0de99fbff67fa (patch) | |
tree | d121851fc23c390c424ba5e0e6ad84fb9118f4cc /drivers/nvme | |
parent | 811f4de0344d48a33a94d5c7d31a0ef0490f5701 (diff) | |
download | linux-bcaf434b8f04e1ee82a8b1e1bce0de99fbff67fa.tar.xz |
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')
-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 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; |