]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: supply: max17040: Check iio_read_channel_processed() return code
authorIvan Abramov <i.abramov@mt-integration.ru>
Wed, 8 Oct 2025 13:36:47 +0000 (16:36 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:02:47 +0000 (14:02 +0100)
commit1cea1ca5e8d4a6e03eda1bb2747c850103a8cd57
tree5ce8d8f0fc433cadd3cf49b08f1f2821bdb61c25
parent97ec116a7e57439081fa7567c618b39d833a7625
power: supply: max17040: Check iio_read_channel_processed() return code

[ Upstream commit 2c68ac48c52ad146523f32b01d70009622bf81aa ]

Since iio_read_channel_processed() may fail, return its exit code on error.

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

Fixes: 814755c48f8b ("power: max17040: get thermal data from adc if available")
Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru>
Link: https://patch.msgid.link/20251008133648.559286-1-i.abramov@mt-integration.ru
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/supply/max17040_battery.c