diff options
author | Jesper Juhl <jj@chaosbits.net> | 2012-04-09 16:52:19 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-10 06:07:58 -0400 |
commit | 34ff0f95b1d7afc707f121ea3ae6b211fc176fbd (patch) | |
tree | 5cb13b8edb636f44ccf77b9badf2e5fc01b909d7 /sound/soc/codecs/wm8994.c | |
parent | bbdd39155682e444941cc70f991154f2936a522b (diff) |
ASoC: wm8994: Don't test for NULL before release_firmware()
release_firmware() does its own NULL ptr testing, it's redundant to
also test before calling it.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 44f72dc27711..8b05e78b11c9 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -3936,7 +3936,7 @@ err_irq: | |||
3936 | return ret; | 3936 | return ret; |
3937 | } | 3937 | } |
3938 | 3938 | ||
3939 | static int wm8994_codec_remove(struct snd_soc_codec *codec) | 3939 | static int wm8994_codec_remove(struct snd_soc_codec *codec) |
3940 | { | 3940 | { |
3941 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); | 3941 | struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); |
3942 | struct wm8994 *control = wm8994->wm8994; | 3942 | struct wm8994 *control = wm8994->wm8994; |
@@ -3977,14 +3977,10 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec) | |||
3977 | free_irq(wm8994->micdet_irq, wm8994); | 3977 | free_irq(wm8994->micdet_irq, wm8994); |
3978 | break; | 3978 | break; |
3979 | } | 3979 | } |
3980 | if (wm8994->mbc) | 3980 | release_firmware(wm8994->mbc); |
3981 | release_firmware(wm8994->mbc); | 3981 | release_firmware(wm8994->mbc_vss); |
3982 | if (wm8994->mbc_vss) | 3982 | release_firmware(wm8994->enh_eq); |
3983 | release_firmware(wm8994->mbc_vss); | ||
3984 | if (wm8994->enh_eq) | ||
3985 | release_firmware(wm8994->enh_eq); | ||
3986 | kfree(wm8994->retune_mobile_texts); | 3983 | kfree(wm8994->retune_mobile_texts); |
3987 | |||
3988 | return 0; | 3984 | return 0; |
3989 | } | 3985 | } |
3990 | 3986 | ||