aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-07-24 16:18:19 +0100
committerMark Brown <broonie@kernel.org>2015-07-24 16:18:19 +0100
commit51126f60491ab1a4952e2a2e93579c9b1deee9d2 (patch)
treea2a02e471cf7324ff3ca3f3042928682fd617f8c /sound
parentMerge remote-tracking branch 'asoc/fix/pcm1681' into asoc-linus (diff)
parentASoC: rt5645: Check if codec is initialized in workqueue handler (diff)
downloadlinux-dev-51126f60491ab1a4952e2a2e93579c9b1deee9d2.tar.xz
linux-dev-51126f60491ab1a4952e2a2e93579c9b1deee9d2.zip
Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus
Diffstat (limited to 'sound')
-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 9ce311e088fc..e9cc3aae5366 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -2943,6 +2943,9 @@ static int rt5645_irq_detection(struct rt5645_priv *rt5645)
{
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) {