kernel_samsung_a53x/drivers/power/supply
Dimitri Fedrau aca85482ca power: supply: gpio-charger: Fix set charge current limits
commit afc6e39e824ad0e44b2af50a97885caec8d213d1 upstream.

Fix set charge current limits for devices which allow to set the lowest
charge current limit to be greater zero. If requested charge current limit
is below lowest limit, the index equals current_limit_map_size which leads
to accessing memory beyond allocated memory.

Fixes: be2919d8355e ("power: supply: gpio-charger: add charge-current-limit feature")
Cc: stable@vger.kernel.org
Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com>
Link: https://lore.kernel.org/r/20241209-fix-charge-current-limit-v1-1-760d9b8f2af3@liebherr.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-15 16:29:51 +01:00
..
88pm860x_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
88pm860x_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ab8500_bmdata.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ab8500_btemp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ab8500_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ab8500_fg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
abx500_chargalg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
act8945a_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adp5061.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apm_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
axp20x_ac_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
axp20x_battery.c Revert "power: supply: axp20x_battery: allow disabling battery charging" 2024-11-24 00:23:27 +01:00
axp20x_usb_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
axp288_charger.c power: supply: axp288_charger: Round constant_charge_voltage writes down 2024-11-23 23:20:29 +01:00
axp288_fuel_gauge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bd70528-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bd99954-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bd99954-charger.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq27xxx_battery.c power: supply: bq27xxx: Fix registers of bq27426 2024-12-17 13:24:13 +01:00
bq27xxx_battery_hdq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq27xxx_battery_i2c.c power: supply: bq27xxx-i2c: Do not free non existing IRQ 2024-11-18 23:18:29 +01:00
bq2415x_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq2515x_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq24190_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq24257_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq24735-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq25890_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq25980_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bq25980_charger.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
charger-manager.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
collie_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpcap-battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpcap-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_usbpd-charger.c power: supply: cros_usbpd: provide ID table for avoiding fallback match 2024-11-19 14:19:07 +01:00
cw2015_battery.c power: supply: cw2015: correct time_to_empty units in sysfs 2024-11-18 12:12:49 +01:00
da9030_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
da9052-battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
da9150-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
da9150-fg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds2760_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds2780_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds2781_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds2782_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
generic-adc-battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
goldfish_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gpio-charger.c power: supply: gpio-charger: Fix set charge current limits 2025-01-15 16:29:51 +01:00
ifpmic_class.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ingenic-battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipaq_micro_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isp1704_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lego_ev3_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lp8727_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lp8788-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lt3651-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2941-battery-gauge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max1721x_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max8903_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max8925_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max8997_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max8998_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max14577_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max14656_charger_detector.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max17040_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max17042_battery.c Revert "power: supply: max17042_battery: Fix SOC threshold calc w/ no current sense" 2024-11-24 00:23:27 +01:00
max77650-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max77693_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mp2629_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
olpc_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcf50633-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pda_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pm2301_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pm2301_charger.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmu_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power_supply.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power_supply_core.c power: supply: core: Remove might_sleep() from power_supply_put() 2024-12-17 13:24:13 +01:00
power_supply_hwmon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power_supply_leds.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power_supply_sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom_smbb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rn5t618_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rt5033_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rt9455_charger.c power: rt9455: hide unused rt9455_boost_voltage_values 2024-11-19 11:32:42 +01:00
rx51_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2asl01_switching.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2m_chg_manager.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mc501_direct_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mc501_pmeter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mf301_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mf301_fuelgauge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mf301_pmeter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mf301_top.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mu106_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mu106_fuelgauge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mu106_pmeter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s3c_adc_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sbs-battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sbs-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sbs-manager.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sc27xx_fuel_gauge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sc2731_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smb347-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tosa_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tps65090-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tps65217_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
twl4030_charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
twl4030_madc_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ucs1002_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wilco-charger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wm97xx_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wm831x_backup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wm831x_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wm8350_power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
z2_battery.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00