linux/drivers/power
Christophe JAILLET 0c80fe5ea1 power: supply: sbs-charger: Don't cancel work that is not initialized
[ Upstream commit de85193cff ]

This driver can use an interrupt or polling in order get the charger's
status.

When using polling, a delayed work is used.

However, the remove() function unconditionally call
cancel_delayed_work_sync(), even if the delayed work is not used and is not
initialized.

In order to fix it, use devm_delayed_work_autocancel() and remove the now
useless remove() function.

Fixes: feb583e37f ("power: supply: add sbs-charger driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:23:35 +02:00
..
reset power: reset: gemini-poweroff: Fix IRQ check in gemini_poweroff_probe 2022-04-08 14:23:27 +02:00
supply power: supply: sbs-charger: Don't cancel work that is not initialized 2022-04-08 14:23:35 +02:00
Kconfig PM: AVS: Drop the avs directory and the corresponding Kconfig 2020-10-22 18:39:32 +02:00
Makefile PM: AVS: Drop the avs directory and the corresponding Kconfig 2020-10-22 18:39:32 +02:00