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 <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index f8fd22c..29159e1 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -64,10 +64,9 @@
int enable;
int oldstatus;
- if (!jack) {
- WARN_ON_ONCE(!jack);
+ if (!jack)
return;
- }
+
codec = jack->card->codec;
mutex_lock(&codec->mutex);