diff mbox

ASoC: max98090: Fix missing free_irq

Message ID 1403159525-4352-1-git-send-email-jarkko.nikula@linux.intel.com (mailing list archive)
State Accepted
Commit 4adeb0ccf86a5af1825bbfe290dee9e60a5ab870
Headers show

Commit Message

Jarkko Nikula June 19, 2014, 6:32 a.m. UTC
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().

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Stable <stable@vger.kernel.org> # 3.10+
---
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(-)

Comments

Mark Brown June 19, 2014, 9:57 a.m. UTC | #1
On Thu, Jun 19, 2014 at 09:32:05AM +0300, Jarkko Nikula wrote:
> 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.
diff mbox

Patch

diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index f5fccc7a8e89..d97f1ce7ff7d 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -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) {