OrangePi_CM5/drivers/regulator
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
..
88pg86x.c
…
88pm800-regulator.c
…
88pm8607.c
…
Kconfig
…
Makefile
…
aat2870-regulator.c
…
ab3100.c
…
ab8500-ext.c
…
ab8500.c
…
act8865-regulator.c
…
act8945a-regulator.c
…
ad5398.c
…
anatop-regulator.c
…
arizona-ldo1.c
…
arizona-micsupp.c
…
as3711-regulator.c
…
as3722-regulator.c
…
axp20x-regulator.c
…
bcm590xx-regulator.c
…
bd718x7-regulator.c regulator: bd718x7: Fix the BUCK7 voltage setting on BD71837 2021-06-16 12:01:43 +02:00
bd9571mwv-regulator.c regulator: bd9571mwv: Fix AVS and DVFS voltage range 2021-04-14 08:42:05 +02:00
bd9576-regulator.c regulator: bd9576: Fix return from bd957x_probe() 2021-05-14 09:50:10 +02:00
bd70528-regulator.c
…
bd71828-regulator.c
…
core.c regulator: core: Prevent integer underflow 2022-10-26 13:25:46 +02:00
cpcap-regulator.c
…
cros-ec-regulator.c regulator: cros-ec: Fix error code in dev_err message 2021-06-23 14:42:47 +02:00
da903x-regulator.c
…
da9052-regulator.c regulator: da9052: Ensure enough delay time for .set_voltage_time_sel 2021-07-14 16:55:56 +02:00
da9055-regulator.c
…
da9062-regulator.c
…
da9063-regulator.c
…
da9210-regulator.c
…
da9210-regulator.h
…
da9211-regulator.c
…
da9211-regulator.h
…
db8500-prcmu.c
…
dbx500-prcmu.c
…
dbx500-prcmu.h
…
devres.c
…
dummy.c
…
dummy.h
…
fan53555.c
…
fan53880.c regulator: fan53880: Fix vsel_mask setting for FAN53880_BUCK 2021-07-14 16:56:06 +02:00
fixed-helper.c
…
fixed.c
…
gpio-regulator.c
…
helpers.c
…
hi655x-regulator.c regulator: hi655x: Fix pass wrong pointer to config.driver_data 2021-07-14 16:56:09 +02:00
hi6421-regulator.c regulator: hi6421: Fix getting wrong drvdata 2021-07-28 14:35:36 +02:00
hi6421v530-regulator.c
…
internal.h
…
isl6271a-regulator.c
…
isl9305.c
…
lm363x-regulator.c
…
lochnagar-regulator.c
…
lp872x.c
…
lp873x-regulator.c
…
lp3971.c
…
lp3972.c
…
lp8755.c
…
lp8788-buck.c
…
lp8788-ldo.c
…
lp87565-regulator.c
…
ltc3589.c
…
ltc3676.c
…
max1586.c
…
max8649.c
…
max8660.c
…
max8907-regulator.c
…
max8925-regulator.c
…
max8952.c
…
max8973-regulator.c
…
max8997-regulator.c
…
max8998.c
…
max14577-regulator.c
…
max77620-regulator.c regulator: max77620: Use device_set_of_node_from_dev() 2021-06-16 12:01:43 +02:00
max77650-regulator.c
…
max77686-regulator.c
…
max77693-regulator.c
…
max77802-regulator.c
…
max77826-regulator.c
…
mc13xxx-regulator-core.c
…
mc13xxx.h
…
mc13783-regulator.c
…
mc13892-regulator.c
…
mcp16502.c
…
mp886x.c
…
mp5416.c
…
mp8859.c
…
mpq7920.c
…
mpq7920.h
…
mt6311-regulator.c
…
mt6311-regulator.h
…
mt6323-regulator.c
…
mt6358-regulator.c regulator: mt6358: Fix vdram2 .vsel_mask 2021-07-14 16:55:56 +02:00
mt6360-regulator.c
…
mt6380-regulator.c
…
mt6397-regulator.c
…
of_regulator.c regulator: of: Fix refcount leak bug in of_get_regulation_constraints() 2022-08-21 15:15:36 +02:00
palmas-regulator.c
…
pbias-regulator.c
…
pca9450-regulator.c regulator: pca9450: Clear PRESET_EN bit to fix BUCK1/2/3 voltage setting 2021-03-25 09:04:14 +01:00
pcap-regulator.c
…
pcf50633-regulator.c
…
pfuze100-regulator.c regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe() 2022-09-23 14:16:59 +02:00
pv88060-regulator.c
…
pv88060-regulator.h
…
pv88080-regulator.c
…
pv88080-regulator.h
…
pv88090-regulator.c
…
pv88090-regulator.h
…
pwm-regulator.c
…
qcom-labibb-regulator.c
…
qcom-rpmh-regulator.c regulator: qcom-rpmh: Correct the pmic5_hfsmps515 buck 2021-03-30 14:31:51 +02:00
qcom_rpm-regulator.c regulator: qcom_rpm: Fix circular deferral regression 2022-10-26 13:25:09 +02:00
qcom_smd-regulator.c regulator: qcom_smd: Fix pm8916_pldo range 2022-08-21 15:15:34 +02:00
qcom_spmi-regulator.c
…
qcom_usb_vbus-regulator.c
…
rc5t583-regulator.c
…
rk808-regulator.c
…
rn5t618-regulator.c
…
rohm-regulator.c regulator: bd718x7, bd71828, Fix dvs voltage levels 2021-03-04 11:38:07 +01:00
rpi-panel-attiny-regulator.c regulator: rpi-panel: Handle I2C errors/timing to the Atmel 2022-04-08 14:40:30 +02:00
rt4801-regulator.c regulator: rt4801: Fix NULL pointer dereference if priv->enable_gpios is NULL 2021-06-23 14:42:48 +02:00
rt5033-regulator.c
…
rtmv20-regulator.c regulator: rtmv20: Fix wrong mask for strobe-polarity-high 2021-08-08 09:05:22 +02:00
s2mpa01.c
…
s2mps11.c
…
s5m8767.c regulator: s5m8767: do not use reset value as DVS voltage if GPIO DVS is disabled 2021-11-18 14:03:45 +01:00
sc2731-regulator.c
…
sky81452-regulator.c
…
slg51000-regulator.c
…
slg51000-regulator.h
…
stm32-booster.c
…
stm32-pwr.c
…
stm32-vrefbuf.c
…
stpmic1_regulator.c
…
stw481x-vmmc.c
…
sy8106a-regulator.c
…
sy8824x.c
…
sy8827n.c
…
ti-abb-regulator.c
…
tps6105x-regulator.c
…
tps6507x-regulator.c
…
tps6524x-regulator.c
…
tps6586x-regulator.c
…
tps51632-regulator.c
…
tps62360-regulator.c
…
tps65023-regulator.c
…
tps65086-regulator.c
…
tps65090-regulator.c
…
tps65132-regulator.c
…
tps65217-regulator.c
…
tps65218-regulator.c
…
tps65910-regulator.c regulator: tps65910: Silence deferred probe error 2021-09-15 09:50:23 +02:00
tps65912-regulator.c
…
tps80031-regulator.c
…
twl-regulator.c
…
twl6030-regulator.c
…
uniphier-regulator.c regulator: uniphier: Add missing MODULE_DEVICE_TABLE 2021-07-14 16:55:50 +02:00
userspace-consumer.c
…
vctrl-regulator.c regulator: vctrl: Avoid lockdep warning in enable/disable ops 2021-09-15 09:50:30 +02:00
vexpress-regulator.c
…
virtual.c
…
vqmmc-ipq4019-regulator.c
…
wm831x-dcdc.c
…
wm831x-isink.c
…
wm831x-ldo.c
…
wm8350-regulator.c
…
wm8400-regulator.c
…
wm8994-regulator.c regulator: wm8994: Add an off-on delay for WM8994 variant 2022-04-20 09:23:22 +02:00