summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorNicolin Chen <b42378@freescale.com>2013-03-20 11:09:17 +0800
committerNicolin Chen <b42378@freescale.com>2013-03-21 18:38:45 +0800
commitad485e37fc6e307c99d8ca2c992af53ac0f1871a (patch)
treebe1b13512e55b9e13ce1ce1d7ce3a39c31f20670 /sound
parent66b13076b616b15b968ba47e88d32d898148eb76 (diff)
ENGR00255029 ASoC: spdif: fix clk_enable/disable() mismatched issue
The function might be returned if the CNEW wasn't detected, while in this case the code won't disable the clk. This patch just fixed the mismatch. Signed-off-by: Nicolin Chen <b42378@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/mxc_spdif.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/codecs/mxc_spdif.c b/sound/soc/codecs/mxc_spdif.c
index 77e62aefe422..b358f719f195 100644
--- a/sound/soc/codecs/mxc_spdif.c
+++ b/sound/soc/codecs/mxc_spdif.c
@@ -888,8 +888,10 @@ static int mxc_spdif_capture_get(struct snd_kcontrol *kcontrol,
clk_enable(plat_data->spdif_clk);
- if (!(__raw_readl(spdif_base_addr + SPDIF_REG_SIS) & INT_CNEW))
+ if (!(__raw_readl(spdif_base_addr + SPDIF_REG_SIS) & INT_CNEW)) {
+ clk_disable(plat_data->spdif_clk);
return -EAGAIN;
+ }
cstatus = __raw_readl(spdif_base_addr + SPDIF_REG_SRCSLH);
ucontrol->value.iec958.status[0] = (cstatus >> 16) & 0xFF;