]> 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)
commit72fdea3cd2dea04dfee8406d1602f9b20c20e4d8
tree0f409db68d265014944e9074ce7313dcc20fa40d
parent4e29edf4b734c20e4ec1ce9f9ba9144c6a179c35
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