linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme-tcp: fix error codes in nvme_tcp_setup_ctrl()
@ 2021-06-05 12:48 Dan Carpenter
  2021-06-05 18:38 ` Chaitanya Kulkarni
  2021-06-08 16:43 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-06-05 12:48 UTC (permalink / raw)
  To: Keith Busch
  Cc: Jens Axboe, Christoph Hellwig, Sagi Grimberg, Max Gurtovoy,
	Chaitanya Kulkarni, Roy Shterman, Solganik Alexander, linux-nvme,
	linux-kernel, kernel-janitors

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>
---
 drivers/nvme/host/tcp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 34f4b3402f7c..72e9d34c3092 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1973,11 +1973,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;
 	}
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvme-tcp: fix error codes in nvme_tcp_setup_ctrl()
  2021-06-05 12:48 [PATCH] nvme-tcp: fix error codes in nvme_tcp_setup_ctrl() Dan Carpenter
@ 2021-06-05 18:38 ` Chaitanya Kulkarni
  2021-06-08 16:43 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2021-06-05 18:38 UTC (permalink / raw)
  To: Dan Carpenter, Keith Busch
  Cc: Jens Axboe, Christoph Hellwig, Sagi Grimberg, Max Gurtovoy,
	Roy Shterman, Solganik Alexander, linux-nvme, linux-kernel,
	kernel-janitors

On 6/5/21 05:49, Dan Carpenter wrote:
> 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>

Looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvme-tcp: fix error codes in nvme_tcp_setup_ctrl()
  2021-06-05 12:48 [PATCH] nvme-tcp: fix error codes in nvme_tcp_setup_ctrl() Dan Carpenter
  2021-06-05 18:38 ` Chaitanya Kulkarni
@ 2021-06-08 16:43 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2021-06-08 16:43 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	Max Gurtovoy, Chaitanya Kulkarni, Roy Shterman,
	Solganik Alexander, linux-nvme, linux-kernel, kernel-janitors

Thanks,

applied to nvme-5.14.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-08 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-05 12:48 [PATCH] nvme-tcp: fix error codes in nvme_tcp_setup_ctrl() Dan Carpenter
2021-06-05 18:38 ` Chaitanya Kulkarni
2021-06-08 16:43 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).