Skip to contentSkip to conversation

ASoC: max98090: Fix missing free_irq

PATCH Applied Jarkko Nikula 2 participants 2 messages Jun 19, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: max98090: Fix missing free_irq

max98090.c doesn't free the threaded interrupt it requests. This causes an oops when doing "cat /proc/interrupts" after snd-soc-max98090.ko is unloaded.

Fix this by requesting the interrupt by using devm_request_threaded_irq().

---
This issue has been in max98090.c since v3.8 commit 685e42154dcf ("ASoC: Replace max98090 Device Driver"). However this patch applies only after v3.10 which has 3d15aacbb802 ("ASoC: max98090: request IRQF_ONESHOT interrupt").
I'm not sure is there need to go before that since first upstream max98090 user was introduced in a v3.14 commit 7637af2e17f1 ("ASoC: tegra:
add tegra+MAX98090 machine driver"). However I'm aware there is an out-of-tree 3.10 user.

---
 sound/soc/codecs/max98090.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/max98090.c +1 -1
index f5fccc7a8e89..d97f1ce7ff7d 100644
@@ -2284,7 +2284,7 @@ static int max98090_probe(struct snd_soc_codec *codec)
 	/* Register for interrupts */
 	dev_dbg(codec->dev, "irq = %d\n", max98090->irq);
 
-	ret = request_threaded_irq(max98090->irq, NULL,
+	ret = devm_request_threaded_irq(codec->dev, max98090->irq, NULL,
 		max98090_interrupt, IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
 		"max98090_interrupt", codec);
 	if (ret < 0) {
Signature · 1 line
2.0.0
maintainer Applied
#1 lore raw
Quoted 3 lines · Jarkko Nikula

max98090.c doesn't free the threaded interrupt it requests. This causes an oops when doing "cat /proc/interrupts" after snd-soc-max98090.ko is unloaded.

Applied, thanks.