summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5645.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-08-06 12:34:41 +0100
committerMark Brown <broonie@kernel.org>2015-08-06 12:34:41 +0100
commit113adf21cf1ed49b57098c1d0d6b38ffbe9ea1e6 (patch)
tree90505c4418561b98f773e5f7b549399e2868c239 /sound/soc/codecs/rt5645.c
parentc3879956957b8de9fd6cbad604e668fd00c6506c (diff)
parent996034b117b467709dec7811ef134063934fa626 (diff)
downloadlinux-113adf21cf1ed49b57098c1d0d6b38ffbe9ea1e6.tar.bz2
Merge tag 'asoc-fix-v4.2-rc3' into asoc-fix-topology
ASoC: Fixes for v4.2 A lot of small fixes here, a few to the core: - Fix for binding DAPM stream widgets on devices with prefixes assigned to them - Minor fixes for the newly added topology interfaces - Locking and memory leak fixes for DAPM - Driver specific fixes
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 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) {