Skip to content
Commit da585c3c authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Heiko Schocher
Browse files

i2c: observe scl_count in i2c_deblock_gpio_loop()



When compiling with -Wtype-limits we see this error:

drivers/i2c/i2c-uclass.c: In function ‘i2c_deblock_gpio_loop’:
drivers/i2c/i2c-uclass.c:517:21: error: comparison of
unsigned expression >= 0 is always true [-Werror=type-limits]
  517 |  while (scl_count-- >= 0) {
      |

Don't loop forever.

Fixes: 1f746a2c ("i2c: Make deblock delay and SCL clock configurable")
Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
parent f6f9a016
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment