From: Jesper Juhl Date: Mon, 9 Apr 2012 20:52:19 +0000 (+0200) Subject: ASoC: wm8994: Don't test for NULL before release_firmware() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=34ff0f95b1d7afc707f121ea3ae6b211fc176fbd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Mark Brown --- 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: return ret; } -static int wm8994_codec_remove(struct snd_soc_codec *codec) +static int wm8994_codec_remove(struct snd_soc_codec *codec) { struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); struct wm8994 *control = wm8994->wm8994; @@ -3977,14 +3977,10 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec) free_irq(wm8994->micdet_irq, wm8994); break; } - if (wm8994->mbc) - release_firmware(wm8994->mbc); - if (wm8994->mbc_vss) - release_firmware(wm8994->mbc_vss); - if (wm8994->enh_eq) - release_firmware(wm8994->enh_eq); + release_firmware(wm8994->mbc); + release_firmware(wm8994->mbc_vss); + release_firmware(wm8994->enh_eq); kfree(wm8994->retune_mobile_texts); - return 0; }