]> git.ipfire.org Git - thirdparty/linux.git/commit
mfd: cs42l43: Fix issues in probe error paths
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Wed, 2 Oct 2024 12:13:11 +0000 (13:13 +0100)
committerLee Jones <lee@kernel.org>
Wed, 16 Oct 2024 08:04:10 +0000 (09:04 +0100)
commite59148b784fbab0354e72dc4fd454def6f160810
tree109444e9d6149bf78a31bc8b7bb08ae141ce5746
parentbf231e5febcf9358d7e70a2c6974548f7f3e4f61
mfd: cs42l43: Fix issues in probe error paths

The error path in cs42l43_boot_work() will lead to an unbalanced
regulator put, when the driver is removed. Fix this by relying
on remove to power down the device. Also the boot work needs to
be synchronised with driver remove, to ensure the work is not
still running after the driver has been removed. Add the required
cancel_work_sync().

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20241002121311.162691-1-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/cs42l43.c