summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5645.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-07-20 19:14:12 +0200
committerMark Brown <broonie@kernel.org>2015-07-20 19:14:12 +0200
commit2c23b0c10f64335031781cf78fd57aae072e9372 (patch)
tree6d2f44458abae5edf048150c16dbff09e4e03602 /sound/soc/codecs/rt5645.c
parentASoC: rt5645: Add regulator support (diff)
parentASoC: rt5645: Check if codec is initialized in workqueue handler (diff)
downloadlinux-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.c3
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) {