]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: supply: rt9467: Prevent using uninitialized local variable in rt9467_set_value...
authorMurad Masimov <m.masimov@mt-integration.ru>
Thu, 9 Oct 2025 14:53:08 +0000 (17:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 12:54:52 +0000 (13:54 +0100)
commit1b8769af5dc1c3f978ca31bd94ca5e2540ed8957
treef39f6cb26a18feddba91a3692b7a35280c2ab806
parente52391c3530288596fd507fcf4e54de347f3f9f3
power: supply: rt9467: Prevent using uninitialized local variable in rt9467_set_value_from_ranges()

[ Upstream commit 15aca30cc6c69806054b896a2ccf7577239cb878 ]

There is a typo in rt9467_set_value_from_ranges() that can cause leaving local
variable sel with an undefined value which is then used in regmap_field_write().

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 6f7f70e3a8dd ("power: supply: rt9467: Add Richtek RT9467 charger driver")
Signed-off-by: Murad Masimov <m.masimov@mt-integration.ru>
Link: https://patch.msgid.link/20251009145308.1830893-1-m.masimov@mt-integration.ru
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/supply/rt9467-charger.c