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:14:10 +0000 (13:14 +0100)
commit63d011ad0505114f5ee56a028e0a808f13e5dc59
tree36100fc5f8a8dcf64d4ea112c3c6e489126f9313
parentf289a38df0da4cfe4b50d04b1b9c3bc646fecd57
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