提交 88f5774b 编写于 作者: B Bill Nottingham 提交者: 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: NBill Nottingham <notting@redhat.com>
Acked-by: NSeokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 f2f027c6
...@@ -2590,7 +2590,7 @@ qla2x00_down_timeout(struct semaphore *sema, unsigned long timeout) ...@@ -2590,7 +2590,7 @@ qla2x00_down_timeout(struct semaphore *sema, unsigned long timeout)
return 0; return 0;
if (msleep_interruptible(step)) if (msleep_interruptible(step))
break; break;
} while (--iterations >= 0); } while (--iterations > 0);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册