power: supply: da9150-fg: Use devm_delayed_work_autocancel()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 13 Feb 2022 17:55:05 +0000 (18:55 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Thu, 24 Feb 2022 11:17:41 +0000 (12:17 +0100)
commit419c0e9d25ac083877eb37143b54eb57af1401dd
tree41c477f9a2496da8c11b410f2db473826766085a
parentde85193cff0d94d030a53656d8fcc41794807bef
power: supply: da9150-fg: Use devm_delayed_work_autocancel()

This driver only uses managed resources, except for the delayed work, if
it is used.

Use devm_delayed_work_autocancel() to also manage the delayed work.
The error handling path of the probe and the remove function can both be
removed.

This saves a few lines of code.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/da9150-fg.c