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>
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;