]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
power: ip5xxx_power: Fix uninitialized variable read
authorBence Csókás <csokas.bence@prolan.hu>
Sun, 8 Dec 2024 13:15:31 +0000 (14:15 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 10 Dec 2024 00:18:44 +0000 (01:18 +0100)
commit94ba531bf9cb3c4ef725ffc37b8ed09006533f25
treefec9f63a0469acbb5a730c961e85204231e85125
parent88e4a7dc04b7828315292eb3acaa466c9c123d8b
power: ip5xxx_power: Fix uninitialized variable read

The check for whether a charger supports the requested
battery voltage was incorrectly added to the
`ip5xxx_battery_get_voltage_max()` function, instead of
`set_voltage_max()`. This commit fixes it.

Reported-by: Kees Bakker <kees@ijzerbout.nl>
Closes: https://lore.kernel.org/linux-kernel/b547c228-df70-4137-9e96-175923f62404@ijzerbout.nl/
Fixes: 8584bc5df539 ("power: ip5xxx_power: Allow for more parameters to be configured")
Signed-off-by: Bence Csókás <csokas.bence@prolan.hu>
Link: https://lore.kernel.org/r/20241208131532.1028581-1-csokas.bence@prolan.hu
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ip5xxx_power.c