diff options
author | Mark Brown <broonie@kernel.org> | 2015-07-24 16:18:19 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-07-24 16:18:19 +0100 |
commit | 51126f60491ab1a4952e2a2e93579c9b1deee9d2 (patch) | |
tree | a2a02e471cf7324ff3ca3f3042928682fd617f8c /sound | |
parent | 66874cc145cbbea3a236e30b15c8f8378708aa31 (diff) | |
parent | f2a5ded38592e5936a099ea6535ad5d3addcbc9d (diff) |
Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus
Diffstat (limited to 'sound')
-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) { |