]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme-rdma: fix error code in nvme_rdma_setup_ctrl
authorMax Gurtovoy <mgurtovoy@nvidia.com>
Sun, 17 Oct 2021 08:58:16 +0000 (11:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 10:36:10 +0000 (11:36 +0100)
commit66c0727e94b82792967a709643133fa21e458d9a
tree4f352ea88c90415ddd35b7bbdaa8e75d65363ee0
parent456d6b503e1c2bb69f178d28070b58e4e4b01de3
nvme-rdma: fix error code in nvme_rdma_setup_ctrl

[ Upstream commit 09748122009aed7bfaa7acc33c10c083a4758322 ]

In case that icdoff is not zero or mandatory keyed sgls are not
supported by the NVMe/RDMA target, we'll go to error flow but we'll
return 0 to the caller. Fix it by returning an appropriate error code.

Fixes: c66e2998c8ca ("nvme-rdma: centralize controller setup sequence")
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/rdma.c