aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-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 d16331e0b64d..c901ef6ba69b 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -2113,6 +2113,10 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec,
2113 int gpio_state, jack_type = 0; 2113 int gpio_state, jack_type = 0;
2114 unsigned int val; 2114 unsigned int val;
2115 2115
2116 if (!gpio_is_valid(rt5645->pdata.hp_det_gpio)) {
2117 dev_err(codec->dev, "invalid gpio\n");
2118 return -EINVAL;
2119 }
2116 gpio_state = gpio_get_value(rt5645->pdata.hp_det_gpio); 2120 gpio_state = gpio_get_value(rt5645->pdata.hp_det_gpio);
2117 2121
2118 dev_dbg(codec->dev, "gpio = %d(%d)\n", rt5645->pdata.hp_det_gpio, 2122 dev_dbg(codec->dev, "gpio = %d(%d)\n", rt5645->pdata.hp_det_gpio,