Patrick Rudolph
b051d9bf98
regulator: core: Prevent integer underflow
...
[ Upstream commit 8d8e16592022c9650df8aedfe6552ed478d7135b ]
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-26 13:25:46 +02:00
..
2022-07-29 17:19:28 +02:00
2022-10-26 13:25:44 +02:00
2022-04-08 14:40:02 +02:00
2022-09-08 11:11:38 +02:00
2022-10-05 10:38:39 +02:00
2022-08-25 11:38:02 +02:00
2022-09-08 11:11:40 +02:00
2022-09-15 11:32:02 +02:00
2022-10-26 13:25:21 +02:00
2022-08-21 15:15:35 +02:00
2022-10-26 13:25:41 +02:00
2022-10-26 13:25:40 +02:00
2022-07-07 17:52:23 +02:00
2022-01-27 10:54:08 +01:00
2022-07-21 21:20:14 +02:00
2022-10-26 13:25:43 +02:00
2022-09-28 11:10:41 +02:00
2022-07-07 17:52:18 +02:00
2022-10-26 13:25:39 +02:00
2022-09-05 10:28:55 +02:00
2022-08-03 12:00:50 +02:00
2022-06-14 18:32:43 +02:00
2022-05-12 12:25:32 +02:00
2022-10-26 13:25:37 +02:00
2022-10-26 13:25:33 +02:00
2022-10-26 13:25:38 +02:00
2022-09-28 11:10:27 +02:00
2022-10-26 13:25:26 +02:00
2022-04-08 14:39:50 +02:00
2022-10-26 13:25:09 +02:00
2022-10-26 13:25:32 +02:00
2022-09-28 11:10:39 +02:00
2022-10-26 13:25:09 +02:00
2022-08-21 15:16:17 +02:00
2022-10-26 13:25:22 +02:00
2022-07-25 11:26:43 +02:00
2022-10-26 13:25:30 +02:00
2022-10-26 13:25:36 +02:00
2022-10-15 07:55:56 +02:00
2022-09-28 11:10:28 +02:00
2022-10-26 13:25:41 +02:00
2022-08-25 11:38:12 +02:00
2022-10-26 13:25:22 +02:00
2022-10-26 13:25:18 +02:00
2022-05-09 09:04:56 +02:00
2022-08-11 13:06:47 +02:00
2022-10-26 13:25:40 +02:00
2022-10-26 13:25:35 +02:00
2022-10-26 13:25:33 +02:00
2022-10-26 13:25:28 +02:00
2022-08-21 15:15:58 +02:00
2022-10-26 13:25:38 +02:00
2022-10-26 13:25:33 +02:00
2022-10-26 13:25:27 +02:00
2022-10-26 13:25:35 +02:00
2022-10-26 13:25:46 +02:00
2022-08-31 17:15:16 +02:00
2022-08-25 11:38:01 +02:00
2022-07-07 17:52:15 +02:00
2022-10-26 13:25:10 +02:00
2022-01-27 10:54:22 +01:00
2022-09-23 14:16:57 +02:00
2022-08-21 15:16:04 +02:00
2022-09-23 14:16:58 +02:00
2022-10-26 13:25:11 +02:00
2022-06-14 18:32:30 +02:00
2022-09-20 12:38:32 +02:00
2022-10-26 13:25:37 +02:00
2022-09-23 14:16:57 +02:00
2022-10-26 13:25:25 +02:00
2022-07-29 17:19:10 +02:00
2022-10-26 13:25:44 +02:00
2022-04-13 21:00:55 +02:00
2022-08-21 15:15:37 +02:00
2022-10-26 13:25:46 +02:00
2022-08-21 15:16:08 +02:00
2022-10-05 10:38:40 +02:00
2022-10-15 07:55:54 +02:00
2022-06-14 18:32:33 +02:00
2022-09-28 11:10:38 +02:00
2022-10-26 13:25:37 +02:00
2022-05-18 10:23:47 +02:00
2022-10-26 13:25:29 +02:00
2022-08-21 15:15:56 +02:00
2022-10-26 13:25:23 +02:00
2022-10-26 13:25:39 +02:00
2022-10-26 13:25:37 +02:00
2022-06-09 10:21:01 +02:00
2022-09-15 11:32:04 +02:00
2022-10-26 13:25:44 +02:00
2022-10-26 13:25:16 +02:00
2022-10-26 13:25:37 +02:00
2022-10-26 13:25:36 +02:00
2022-06-09 10:21:29 +02:00
2022-09-28 11:10:38 +02:00
2022-10-26 13:25:22 +02:00
2022-10-26 13:25:11 +02:00
2022-08-25 11:38:14 +02:00
2022-07-21 21:20:13 +02:00
2022-04-13 21:01:01 +02:00
2022-08-21 15:16:10 +02:00
2022-09-08 11:11:38 +02:00