Commit 88f5774b authored by Bill Nottingham's avatar Bill Nottingham Committed by James Bottomley

[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: default avatarBill Nottingham <notting@redhat.com>
Acked-by: default avatarSeokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent f2f027c6
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment