diff options
author | Mark Brown <broonie@kernel.org> | 2015-07-20 18:14:12 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-07-20 18:14:12 +0100 |
commit | 2c23b0c10f64335031781cf78fd57aae072e9372 (patch) | |
tree | 6d2f44458abae5edf048150c16dbff09e4e03602 | |
parent | 9fc114c5d7af6cfb72a2d983e16b83161716d6d0 (diff) | |
parent | f2a5ded38592e5936a099ea6535ad5d3addcbc9d (diff) | |
download | linux-2c23b0c10f64335031781cf78fd57aae072e9372.tar.bz2 |
Merge branch 'fix/rt5645' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5645
-rw-r--r-- | sound/soc/codecs/rt5645.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 5f5d8adf6f42..19392b13bd5b 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -2927,6 +2927,9 @@ static void rt5645_jack_detect_work(struct work_struct *work) container_of(work, struct rt5645_priv, jack_detect_work.work); int val, btn_type, gpio_state = 0, report = 0; + if (!rt5645->codec) + return -EINVAL; + switch (rt5645->pdata.jd_mode) { case 0: /* Not using rt5645 JD */ if (rt5645->gpiod_hp_det) { |