alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@kernel.org>,
	Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: [PATCH] ASoC: max98090: Fix missing free_irq (part 2)
Date: Thu, 18 Sep 2014 13:48:44 +0300	[thread overview]
Message-ID: <1411037324-5996-1-git-send-email-jarkko.nikula@linux.intel.com> (raw)

I was blind to see interrupt was requested in codec probe instead of i2c
probe when doing commit 4adeb0ccf86a ("ASoC: max98090: Fix missing free_irq")
and there is still a case where interrupt is kept requested. Although not as
fatal as original issue.

Since codec can be reprobed while driver is loaded the subsequent
max98090_probe() call will fail in interrupt request since it wasn't freed.

Fix this by explicitly freeing irq in max98090_remove().

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
for-next, I don't think this is critical enough for stable.
---
 sound/soc/codecs/max98090.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index f1543653a699..ccc1466c0440 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -2413,6 +2413,7 @@ static int max98090_remove(struct snd_soc_codec *codec)
 {
 	struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec);
 
+	devm_free_irq(codec->dev, max98090->irq, codec);
 	cancel_delayed_work_sync(&max98090->jack_work);
 	cancel_delayed_work_sync(&max98090->pll_det_enable_work);
 	cancel_work_sync(&max98090->pll_det_disable_work);
-- 
2.1.0

             reply	other threads:[~2014-09-18 10:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18 10:48 Jarkko Nikula [this message]
2014-09-18 17:54 ` [PATCH] ASoC: max98090: Fix missing free_irq (part 2) Mark Brown
2014-09-19  7:51   ` Jarkko Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411037324-5996-1-git-send-email-jarkko.nikula@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).