scsi: qla2xxx: Fix an loop timeout test

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

Fixes: 7ec0effd30 ("[SCSI] qla2xxx: Add support for ISP8044.")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/an1twcxTYSFkkUTA@stanley.mountain
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
Dan Carpenter 2026-08-13 10:09:53 +03:00 committed by Martin K. Petersen (Oracle)
parent ff9365a4c9
commit 11e48f5201

View File

@ -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;