]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: cs42l42: free_irq() before powering-down on probe() fail
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 26 Oct 2021 12:57:22 +0000 (13:57 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 26 Oct 2021 13:31:10 +0000 (14:31 +0100)
commit87645d7695da52e9b995ac285e666d6c6c22de43
tree0f409db68d265014944e9074ce7313dcc20fa40d
parent0caa17a79272ddea49c5cfdc09466e48e35af0b3
ASoC: cs42l42: free_irq() before powering-down on probe() fail

Relying on devm to free the irq handler on probe failure leaves a
small window of opportunity for an interrupt to become pending and
then the handler to run after the chip has been reset and powered
off.

For safety cs42l42_probe() should free the irq in the error path.
As the irq is now disabled by the driver in probe() and remove()
there is no point allocating it as a devres-managed item, so
convert to plain non-devres.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20211026125722.10220-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l42.c