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:49:42 +0800
commit7ba5b6048dae6b6a89f629c1bc587afc34e3fe8b (patch)
treefdbf74181bab09fad730814c2ac13213317705a2 /sound
parent3c4d081940ec00fecd87a55721e14116dc01e481 (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;