diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 649fd75d37b6..ea9f91756c1e 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -568,11 +568,8 @@ qla2x00_eh_wait_on_command(struct scsi_cmnd *cmd) | |||
568 | unsigned long wait_iter = ABORT_WAIT_ITER; | 568 | unsigned long wait_iter = ABORT_WAIT_ITER; |
569 | int ret = QLA_SUCCESS; | 569 | int ret = QLA_SUCCESS; |
570 | 570 | ||
571 | while (CMD_SP(cmd)) { | 571 | while (CMD_SP(cmd) && wait_iter--) { |
572 | msleep(ABORT_POLLING_PERIOD); | 572 | msleep(ABORT_POLLING_PERIOD); |
573 | |||
574 | if (--wait_iter) | ||
575 | break; | ||
576 | } | 573 | } |
577 | if (CMD_SP(cmd)) | 574 | if (CMD_SP(cmd)) |
578 | ret = QLA_FUNCTION_FAILED; | 575 | ret = QLA_FUNCTION_FAILED; |