Skip to contentSkip to conversation

nvme-tcp-offload: Fix error return code in nvme_tcp_ofld_setup_ctrl()

PATCH New Wei Yongjun 1 participant 1 message Jun 8, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme-tcp-offload: Fix error return code in nvme_tcp_ofld_setup_ctrl()

Fix to return negative error code -EINVAL if mandatory sgls are not supported.

Fixes 5aadd5f9311e ("nvme-tcp-offload: Add controller level implementation")
---
 drivers/nvme/host/tcp-offload.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvme/host/tcp-offload.c +1 -0
index c76822e5ada7..3879d5ed7497 100644
@@ -622,6 +622,7 @@ static int nvme_tcp_ofld_setup_ctrl(struct nvme_ctrl *nctrl, bool new)
 
 	if (!(nctrl->sgls & ((1 << 0) | (1 << 1)))) {
 		dev_err(nctrl->device, "Mandatory sgls are not supported!\n");
+		rc = -EINVAL;
 		goto destroy_admin;
 	}