]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: rsnd: adg: check return value for rsnd_adg_get_clkin/out()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 1 Jun 2021 23:44:09 +0000 (08:44 +0900)
committerMark Brown <broonie@kernel.org>
Thu, 3 Jun 2021 12:56:41 +0000 (13:56 +0100)
commita848bc93679bd0d0c3fbf6140a7fe927f27e76ae
treebac964fd52a6cba78c981c2dc0fb89aedc57306a
parent05e7d1c71b81681558fbadec540d5b413f95ec95
ASoC: rsnd: adg: check return value for rsnd_adg_get_clkin/out()

Current rsnd_adg_get_clkin/out() are void function,
thus adg->clk/clkout[i] might be NULL.

But, for_each_rsnd_clk/clkout() macros are assuming
all clks are non NULL.

Because of this mismatch, code can be complex and/or buggy.
These functions return error by this patch,
and make sure all clks are non NULL.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pmx5i20m.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/adg.c