diff mbox series

scsi: qla2xxx: Fix wrong return value in qlt_chk_unresolv_exchg()

Message ID 20200802111528.4974-1-tianjia.zhang@linux.alibaba.com
State New
Headers show
Series scsi: qla2xxx: Fix wrong return value in qlt_chk_unresolv_exchg() | expand

Commit Message

tianjia.zhang Aug. 2, 2020, 11:15 a.m. UTC
In the case of a failed retry, a positive value EIO is returned here.
I think this is a typo error. It is necessary to return an error value.

Fixes: 0691094ff3f2c ("scsi: qla2xxx: Add logic to detect ABTS hang and response completion")
Cc: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
---
 drivers/scsi/qla2xxx/qla_target.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin K. Petersen Aug. 31, 2020, 5:41 p.m. UTC | #1
On Sun, 2 Aug 2020 19:15:28 +0800, Tianjia Zhang wrote:

> In the case of a failed retry, a positive value EIO is returned here.
> I think this is a typo error. It is necessary to return an error value.

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: qla2xxx: Fix wrong return value in qlt_chk_unresolv_exchg()
      https://git.kernel.org/mkp/scsi/c/bbf2d06a9d76
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index c2c0e6049da4..f2bb841c2059 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -5668,7 +5668,7 @@  static int qlt_chk_unresolv_exchg(struct scsi_qla_host *vha,
 		/* found existing exchange */
 		qpair->retry_term_cnt++;
 		if (qpair->retry_term_cnt >= 5) {
-			rc = EIO;
+			rc = -EIO;
 			qpair->retry_term_cnt = 0;
 			ql_log(ql_log_warn, vha, 0xffff,
 			    "Unable to send ABTS Respond. Dumping firmware.\n");