diff options
author | Mark Brown <broonie@kernel.org> | 2015-07-24 17:18:19 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-07-24 17:18:19 +0200 |
commit | 51126f60491ab1a4952e2a2e93579c9b1deee9d2 (patch) | |
tree | a2a02e471cf7324ff3ca3f3042928682fd617f8c | |
parent | Merge remote-tracking branch 'asoc/fix/pcm1681' into asoc-linus (diff) | |
parent | ASoC: rt5645: Check if codec is initialized in workqueue handler (diff) | |
download | linux-51126f60491ab1a4952e2a2e93579c9b1deee9d2.tar.xz linux-51126f60491ab1a4952e2a2e93579c9b1deee9d2.zip |
Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus
-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 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) { |