aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/tcp.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-06-05 15:48:16 +0300
committerChristoph Hellwig <hch@lst.de>2021-06-16 05:36:16 +0200
commit522af60cb2f8e3658bda1902fb7f200dcf888a5c (patch)
treeeea2327698bc8b2af8b154fd5910ab028d01cd35 /drivers/nvme/host/tcp.c
parentnvme: factor out a nvme_validate_passthru_nsid helper (diff)
downloadlinux-dev-522af60cb2f8e3658bda1902fb7f200dcf888a5c.tar.xz
linux-dev-522af60cb2f8e3658bda1902fb7f200dcf888a5c.zip
nvme-tcp: fix error codes in nvme_tcp_setup_ctrl()
These error paths currently return success but they should return -EOPNOTSUPP. Fixes: 73ffcefcfca0 ("nvme-tcp: check sgl supported by target") Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/tcp.c')
-rw-r--r--drivers/nvme/host/tcp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 5fc6c568c626..6a65b0516180 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1988,11 +1988,13 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new)
return ret;
if (ctrl->icdoff) {
+ ret = -EOPNOTSUPP;
dev_err(ctrl->device, "icdoff is not supported!\n");
goto destroy_admin;
}
if (!(ctrl->sgls & ((1 << 0) | (1 << 1)))) {
+ ret = -EOPNOTSUPP;
dev_err(ctrl->device, "Mandatory sgls are not supported!\n");
goto destroy_admin;
}