From: Mark Brown Date: Mon, 29 Mar 2010 19:31:14 +0000 (+0100) Subject: ASoC: Allow reporting of NULL jacks X-Git-Tag: firefly_0821_release~9833^2~1382^2~7^2~43 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3a278a0c65c924950c4744ba451a110998998044;p=firefly-linux-kernel-4.4.55.git ASoC: Allow reporting of NULL jacks Follow the core jack implementation and allow reporting on the status of NULL jacks, avoiding the need to check in detection implementations. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index f8fd22cc70bc..29159e1781d0 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -64,10 +64,9 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) int enable; int oldstatus; - if (!jack) { - WARN_ON_ONCE(!jack); + if (!jack) return; - } + codec = jack->card->codec; mutex_lock(&codec->mutex);