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>
Thu, 18 Nov 2021 18:16:38 +0000 (19:16 +0100)
commitff950ae83201efeafdd440eac798201fd7e3f8cb
treef51a2dbf32f9c9fc1579e88d260e96d5f4b5fd3e
parentb2cf0bed6817e283ec1708bc2ca3bb5d8b9f0f4f
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