]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: supply: cw2015: Check devm_delayed_work_autocancel() return code
authorIvan Abramov <i.abramov@mt-integration.ru>
Wed, 8 Oct 2025 12:07:11 +0000 (15:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:02:47 +0000 (14:02 +0100)
commit97ec116a7e57439081fa7567c618b39d833a7625
tree20e44487852ed55f47c5bdcd524eeae9e86bb031
parent8c473255e5ee235e91bc5a41bbf60431a16a2db6
power: supply: cw2015: Check devm_delayed_work_autocancel() return code

[ Upstream commit 92ec7e7b86ec0aff9cd7db64d9dce50a0ea7c542 ]

Since devm_delayed_work_autocancel() may fail, add return code check and
exit cw_bat_probe() on error.

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

Fixes: 0cb172a4918e ("power: supply: cw2015: Use device managed API to simplify the code")
Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru>
Link: https://patch.msgid.link/20251008120711.556021-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/cw2015_battery.c