From: Mark Brown Date: Sat, 3 Mar 2012 00:10:02 +0000 (+0000) Subject: ASoC: wm8994: Don't bother updating the jackdet mode needlessly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=149c53b514d0a42abbb2c9611ffc9fa2d94857e8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ASoC: wm8994: Don't bother updating the jackdet mode needlessly If we're not doing jackdet it's not needed. Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index c9af13f14331..44f72dc27711 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -686,6 +686,9 @@ static void wm1811_jackdet_set_mode(struct snd_soc_codec *codec, u16 mode) { struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); + if (!wm8994->jackdet || !wm8994->jack_cb) + return; + if (!wm8994->jackdet || !wm8994->jack_cb) return;