ASoC: rsnd: check rsnd_adg_clk_enable() return value
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 9 Jan 2025 00:40:05 +0000 (00:40 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 9 Jan 2025 13:17:02 +0000 (13:17 +0000)
commit139fa599cea0fd9d38e00246ea9f79af6c59acbd
tree5e7299ee4b9de8a6cbfb71b2b9acba206e841e00
parent8f0defd2e52d22eb994d7e770b1261caa24917d8
ASoC: rsnd: check rsnd_adg_clk_enable() return value

rsnd_adg_clk_enable() might be failed for some reasons, but it doesn't
check return value for now. In such case, we might get below WARNING from
clk_disable() during probe or suspend. Check rsnd_adg_clk_enable() return
value.

    clk_multiplier already disabled
    ...
    Call trace:
     clk_core_disable+0xd0/0xd8 (P)
     clk_disable+0x2c/0x44
     rsnd_adg_clk_control+0x80/0xf4

According to Geert, it happened only 7 times during the last 2 years.
So I have reproduced the issue and created patch by Intentionally making
an error.

Link: https://lore.kernel.org/r/CAMuHMdVUKpO2rsia+36BLFFwdMapE8LrYS0duyd0FmrxDvwEfg@mail.gmail.com
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87seps2522.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/renesas/rcar/adg.c
sound/soc/renesas/rcar/core.c
sound/soc/renesas/rcar/rsnd.h