浏览代码

[SCSI] qla2xxx: fix timeout in qla2x00_down_timeout

iterations is unsigned, so it is impossible to get out of the loop
and return -ETIMEDOUT.

Signed-off-by: Bill Nottingham <notting@redhat.com>
Acked-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Bill Nottingham 18 年之前
父节点
当前提交
88f5774b07
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/scsi/qla2xxx/qla_os.c

+ 1 - 1
drivers/scsi/qla2xxx/qla_os.c

@@ -2590,7 +2590,7 @@ qla2x00_down_timeout(struct semaphore *sema, unsigned long timeout)
 			return 0;
 		if (msleep_interruptible(step))
 			break;
-	} while (--iterations >= 0);
+	} while (--iterations > 0);
 
 	return -ETIMEDOUT;
 }