nvme: return err on nvme_init_non_mdts_limits fail
authorJoel Granados <j.granados@samsung.com>
Wed, 2 Nov 2022 17:17:08 +0000 (18:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:11 +0000 (13:32 +0100)
commit18ef9434379b695442d778a8c7f1094ca170a7cb
tree26fba380ef952a628e696c3e010b4cc77e535040
parent8084bd0a64e278314b733993f388d83a86aa1183
nvme: return err on nvme_init_non_mdts_limits fail

[ Upstream commit bcaf434b8f04e1ee82a8b1e1bce0de99fbff67fa ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c