From: Nicolin Chen Date: Wed, 20 Mar 2013 03:09:17 +0000 (+0800) Subject: ENGR00255029 ASoC: spdif: fix clk_enable/disable() mismatched issue X-Git-Tag: v3.0.35-fsl~62 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a916b06659f967d5b50e60a34d24c1e1031ffbb3;p=karo-tx-linux.git 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 --- 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;