Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Handrigan, Paul" <Paul.Handrigan@cirrus.com>
To: Axel Lin <axel.lin@ingics.com>, Mark Brown <broonie@kernel.org>
Cc: "Austin, Brian" <Brian.Austin@cirrus.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] ASoC: cs35l33: Remove unnecessary free_irq call
Date: Tue, 28 Jun 2016 14:29:46 +0000	[thread overview]
Message-ID: <D397F3F0.150B3%Paul.Handrigan@cirrus.com> (raw)
In-Reply-To: <1467103218.25747.1.camel@ingics.com>



On 6/28/16, 3:40 AM, "Axel Lin" <axel.lin@ingics.com> wrote:

>Current code uses devm_request_threaded_irq() so it does not need to
>explicitly call free_irq() in .probe error path and .remove.
>
>Signed-off-by: Axel Lin <axel.lin@ingics.com>
>---
> sound/soc/codecs/cs35l33.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
>diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
>index 55c1f75..90dc743 100644
>--- a/sound/soc/codecs/cs35l33.c
>+++ b/sound/soc/codecs/cs35l33.c
>@@ -1195,7 +1195,7 @@ static int cs35l33_i2c_probe(struct i2c_client
>*i2c_client,
> 		dev_err(&i2c_client->dev,
> 			"Failed to enable core supplies: %d\n",
> 			ret);
>-		goto err_irq;
>+		return ret;
> 	}
> 
> 	if (cs35l33->reset_gpio)
>@@ -1251,7 +1251,7 @@ static int cs35l33_i2c_probe(struct i2c_client
>*i2c_client,
> 	if (ret < 0) {
> 		dev_err(&i2c_client->dev, "%s: Register codec failed\n",
> 			__func__);
>-		goto err_irq;
>+		goto err_enable;
> 	}
> 
> 	return 0;
>@@ -1259,8 +1259,6 @@ static int cs35l33_i2c_probe(struct i2c_client
>*i2c_client,
> err_enable:
> 	regulator_bulk_disable(cs35l33->num_core_supplies,
> 			       cs35l33->core_supplies);
>-err_irq:
>-	free_irq(i2c_client->irq, cs35l33);
> 
> 	return ret;
> }
>@@ -1277,7 +1275,6 @@ static int cs35l33_i2c_remove(struct i2c_client
>*client)
> 	pm_runtime_disable(&client->dev);
> 	regulator_bulk_disable(cs35l33->num_core_supplies,
> 		cs35l33->core_supplies);
>-	free_irq(client->irq, cs35l33);
> 
> 	return 0;
> }
>-- 
>2.5.0
Thanks!

Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
>

  reply	other threads:[~2016-06-28 14:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28  8:40 [PATCH] ASoC: cs35l33: Remove unnecessary free_irq call Axel Lin
2016-06-28 14:29 ` Handrigan, Paul [this message]
2016-06-28 19:56 ` Applied "ASoC: cs35l33: Remove unnecessary free_irq call" to the asoc tree Mark Brown

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=D397F3F0.150B3%Paul.Handrigan@cirrus.com \
    --to=paul.handrigan@cirrus.com \
    --cc=Brian.Austin@cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=axel.lin@ingics.com \
    --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