diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2022-09-09 14:59:53 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-09-09 23:27:10 +0200 |
commit | 8d8e16592022c9650df8aedfe6552ed478d7135b (patch) | |
tree | 3c556b1808d21ec2cd299b632375e920897d1f12 /Documentation/arm64 | |
parent | regulator: dt-bindings: qcom,rpmh: Indicate regulator-allow-set-load dependen... (diff) | |
download | linux-8d8e16592022c9650df8aedfe6552ed478d7135b.tar.xz linux-8d8e16592022c9650df8aedfe6552ed478d7135b.zip |
regulator: core: Prevent integer underflow
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>
Diffstat (limited to 'Documentation/arm64')
0 files changed, 0 insertions, 0 deletions