summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-05-30 04:16:43 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-30 10:15:32 -0500
commit88f5774b0748d6d9ebec7a39caae98c0d83b8cc8 (patch)
tree5bd65aee1c4e629b60c23e97ac36450f5a254d41 /drivers/scsi
parentf2f027c6e9912840020be8b78f037d5c8ac665e0 (diff)
downloadop-kernel-dev-88f5774b0748d6d9ebec7a39caae98c0d83b8cc8.zip
op-kernel-dev-88f5774b0748d6d9ebec7a39caae98c0d83b8cc8.tar.gz
[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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index dd076da..b98136a 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;
}
OpenPOWER on IntegriCloud