From 88f5774b0748d6d9ebec7a39caae98c0d83b8cc8 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 30 May 2007 04:16:43 -0400 Subject: [PATCH] [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 Acked-by: Seokmann Ju Signed-off-by: James Bottomley --- drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index dd076da86a46..b98136adaaae 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/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; } -- GitLab