diff options
author | Mark Brown <broonie@kernel.org> | 2015-07-20 19:14:12 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-07-20 19:14:12 +0200 |
commit | 2c23b0c10f64335031781cf78fd57aae072e9372 (patch) | |
tree | 6d2f44458abae5edf048150c16dbff09e4e03602 /sound/soc/codecs/rt5645.c | |
parent | ASoC: rt5645: Add regulator support (diff) | |
parent | ASoC: rt5645: Check if codec is initialized in workqueue handler (diff) | |
download | linux-2c23b0c10f64335031781cf78fd57aae072e9372.tar.xz linux-2c23b0c10f64335031781cf78fd57aae072e9372.zip |
Merge branch 'fix/rt5645' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5645
Diffstat (limited to 'sound/soc/codecs/rt5645.c')
-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) { |