diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-03-19 17:47:31 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-04-17 20:54:22 +0300 |
commit | 2f51061edab942988b1a3c057d21228e938603db (patch) | |
tree | 8e10880655904217dbb043a05441b15bc1062786 /drivers/bcma | |
parent | c81852a48e137c61e8c85863b5a5104acc1a8270 (diff) |
wilc1000: fix a loop timeout condition
If the loop fails, the "while(trials--) {" loop will exit with "trials"
set to -1. The test for that expects it to end with "trials" set to 0
so the warning message will not be printed.
Fix this by changing from a post-op to a pre-op. This does mean that
we only make 99 attempts instead of 100 but that's okay.
Fixes: f135a1571a05 ("wilc1000: Support chip sleep over SPI")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/YFS5gx/gi70zlIaO@mwanda
Diffstat (limited to 'drivers/bcma')
0 files changed, 0 insertions, 0 deletions