Skip to content

Commit

Permalink
[SCSI] qla2xxx: fix timeout in qla2x00_down_timeout
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bill Nottingham authored and James Bottomley committed May 30, 2007
1 parent f2f027c commit 88f5774
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/qla2xxx/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 88f5774

Please sign in to comment.