summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5645.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-12-16 23:40:02 +0300
committerTakashi Iwai <tiwai@suse.de>2014-12-16 23:40:02 +0300
commita62bbe309338b73482be0de8fc2833d63771d61e (patch)
tree5531742a1c79e7083fa5a9f4260c09e3e61d3e11 /sound/soc/codecs/rt5645.c
parent432ac1a2c028acb289d90f918e3a7b79e4ac8c07 (diff)
parentc52e5698efef1d9999d744be001be62d9fcabf55 (diff)
downloadlinux-a62bbe309338b73482be0de8fc2833d63771d61e.tar.xz
Merge tag 'asoc-v3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Merge window fixes for v3.19 A smattering of driver specific fixes here, some more cleanup of the Exynos7 and Intel ACPI support plus a fix for register cache sync on the pcm512x driver which has been lurking for a while.
Diffstat (limited to 'sound/soc/codecs/rt5645.c')
-rw-r--r--sound/soc/codecs/rt5645.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index a7789a8726e3..27141e2df878 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -2209,6 +2209,10 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec)
int gpio_state, jack_type = 0;
unsigned int val;
+ if (!gpio_is_valid(rt5645->pdata.hp_det_gpio)) {
+ dev_err(codec->dev, "invalid gpio\n");
+ return -EINVAL;
+ }
gpio_state = gpio_get_value(rt5645->pdata.hp_det_gpio);
dev_dbg(codec->dev, "gpio = %d(%d)\n", rt5645->pdata.hp_det_gpio,