diff options
author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2021-10-15 14:36:18 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-10-15 16:14:23 +0100 |
commit | 4c8d49bc476c7cf1fb7377b469ced43ced470027 (patch) | |
tree | 464272722f7ec93f417b48eb694a439638e8e59e /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 0c3d6c6ff75aa6b21cd4ac872dd3050b6525c75c (diff) |
ASoC: cs42l42: Fix WARN in remove() if running without an interrupt
The driver must free the IRQ in remove() to prevent the potential race
where an IRQ starts to be handled while the driver is being removed but
devres has not yet called free_irq(). However, the driver can run without
an interrupt but devm_free_irq() will hit a WARN() if no devres-managed
interrupt was ever created.
Fix this by only attempting to create the interrupt handler if the hardware
config specified an interrupt, and failing probe() if the interrupt could
not be created. This means that in cs42l42_remove() an interrupt must have
been registered if the irq number is valid and therefore it is safe to call
devm_free_irq().
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20211015133619.4698-16-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions