nvme-tcp: fix error codes in nvme_tcp_setup_ctrl()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/nvme/host/tcp.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/nvme/host/tcp.c +2 -0
@@ -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; }
Signature · 1 line
2.30.2
Quoted 6 lines · Dan Carpenter
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 <[email protected]>
Looks good.
Reviewed-by Chaitanya Kulkarni <[email protected]>
Thanks,
applied to nvme-5.14.