summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm5100.c
diff options
context:
space:
mode:
authorAxel Lin2011-09-23 07:23:10 +0200
committerMark Brown2011-09-23 12:54:24 +0200
commit0a742681e6072a71f30cfe6312f758f1cd185c21 (patch)
tree04d3704686e990648299852b4fe47e7458ccdf88 /sound/soc/codecs/wm5100.c
parentASoC: Remove unneeded mutex_init in wl1273_probe() (diff)
downloadkernel-qcow2-linux-0a742681e6072a71f30cfe6312f758f1cd185c21.tar.gz
kernel-qcow2-linux-0a742681e6072a71f30cfe6312f758f1cd185c21.tar.xz
kernel-qcow2-linux-0a742681e6072a71f30cfe6312f758f1cd185c21.zip
ASoC: Add missed free_irq in wm5100_remove and wm5100_probe error path
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm5100.c')
-rw-r--r--sound/soc/codecs/wm5100.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index cb940a8b3914..f6039890edfd 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -2493,6 +2493,8 @@ static int wm5100_probe(struct snd_soc_codec *codec)
return 0;
err_gpio:
+ if (i2c->irq)
+ free_irq(i2c->irq, codec);
wm5100_free_gpio(codec);
err_reset:
if (wm5100->pdata.reset) {
@@ -2523,11 +2525,14 @@ err_core:
static int wm5100_remove(struct snd_soc_codec *codec)
{
struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec);
+ struct i2c_client *i2c = to_i2c_client(codec->dev);
wm5100_set_bias_level(codec, SND_SOC_BIAS_OFF);
if (wm5100->pdata.hp_pol) {
gpio_free(wm5100->pdata.hp_pol);
}
+ if (i2c->irq)
+ free_irq(i2c->irq, codec);
wm5100_free_gpio(codec);
if (wm5100->pdata.reset) {
gpio_set_value_cansleep(wm5100->pdata.reset, 1);