Files
linux/drivers/regulator
Patrick Rudolph bfe602d9a3 regulator: core: Prevent integer underflow
[ Upstream commit 8d8e165920 ]

By using a ratio of delay to poll_enabled_time that is not integer
time_remaining underflows and does not exit the loop as expected.
As delay could be derived from DT and poll_enabled_time is defined
in the driver this can easily happen.

Use a signed iterator to make sure that the loop exits once
the remaining time is negative.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Link: https://lore.kernel.org/r/20220909125954.577669-1-patrick.rudolph@9elements.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-21 12:39:08 +02:00
..
2021-06-04 15:27:10 +01:00
2022-07-07 12:23:44 +01:00
2020-05-08 18:18:13 +01:00
2022-03-07 13:15:01 +00:00
2022-03-07 13:15:01 +00:00