From patchwork Thu Sep 18 10:48:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 4930411 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 35D67BEEA5 for ; Thu, 18 Sep 2014 10:49:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF6B8201B9 for ; Thu, 18 Sep 2014 10:49:10 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 8766C20142 for ; Thu, 18 Sep 2014 10:49:09 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 77FA62654EE; Thu, 18 Sep 2014 12:49:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 350F42651A9; Thu, 18 Sep 2014 12:48:58 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 25790265232; Thu, 18 Sep 2014 12:48:57 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id 07AC3264EFF for ; Thu, 18 Sep 2014 12:48:49 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by orsmga101.jf.intel.com with ESMTP; 18 Sep 2014 03:48:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,546,1406617200"; d="scan'208";a="478403837" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.56]) by azsmga001.ch.intel.com with ESMTP; 18 Sep 2014 03:48:46 -0700 From: Jarkko Nikula To: alsa-devel@alsa-project.org Date: Thu, 18 Sep 2014 13:48:44 +0300 Message-Id: <1411037324-5996-1-git-send-email-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.1.0 Cc: Mark Brown , Jarkko Nikula , Liam Girdwood Subject: [alsa-devel] [PATCH] ASoC: max98090: Fix missing free_irq (part 2) X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);