提交 36c6a7ac 编写于 作者: B Brian Norris

mtd: cfi_cmdset_0002: allow retry/timeout loop to exit

The variable 'retries' is never modified, so if the reset operation
never is going to complete, we'll get stuck in an infinite loop.

It looks like the intention was to decrement 'retries' on every loop.
Untested.

Caught by Coverity.
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
上级 57d3a9a8
......@@ -2029,6 +2029,8 @@ static int cfi_amdstd_panic_wait(struct map_info *map, struct flchip *chip,
udelay(1);
}
retries--;
}
/* the chip never became ready */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册