Skip to contentSkip to conversation

scsi: qla2xxx: Fix an loop timeout test

PATCH Applied Dan Carpenter 2 participants 3 messages Aug 13 – Aug 26

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

PATCH 1/1 scsi: qla2xxx: Fix an loop timeout test

This loop timeout with "retries" set to -1, not 0. Fix the test for failure.

Fixes 7ec0effd30bb ("[SCSI] qla2xxx: Add support for ISP8044.")
---
 drivers/scsi/qla2xxx/qla_nx2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_nx2.c +1 -1
index 41ff6fbdb933..04d7ab6ad037 100644
@@ -3507,7 +3507,7 @@ qla8044_poll_flash_status_reg(struct scsi_qla_host *vha)
 		msleep(QLA8044_FLASH_STATUS_REG_POLL_DELAY);
 	}
 
-	if (!retries)
+	if (retries == -1)
 		ret_val = QLA_FUNCTION_FAILED;
 
 	return ret_val;
Signature · 1 line
2.53.0
maintainer Applied
#1 lore raw

Dan,

Quoted 2 lines

This loop timeout with "retries" set to -1, not 0. Fix the test for failure.

Applied to 7.3/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen