]> Gentwo Git Trees - linux/.git/commit
ASoC: mediatek: common: Switch to for_each_available_child_of_node_scoped()
authorChen-Yu Tsai <wenst@chromium.org>
Mon, 25 Aug 2025 15:11:09 +0000 (23:11 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 28 Aug 2025 09:08:33 +0000 (11:08 +0200)
commitb088b6189a4066b97cef459afd312fd168a76dea
tree5f4367eff61078277bd45a086fa804e459282ca9
parenta12b74d2bd4724ee1883bc97ec93eac8fafc8d3c
ASoC: mediatek: common: Switch to for_each_available_child_of_node_scoped()

Using for_each_available_child_of_node_scoped() allows us to get rid of
of_node_put() calls from early returns or breaks in the loop. It also
fixes issues with missing of_node_put() calls.

Switch to for_each_available_child_of_node_scoped() in parse_dai_link_info().
Also drop the braces around if blocks now that the inner block is just
one statement.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Fei Shao <fshao@chromium.org>
Message-ID: <20250825151111.3696404-1-wenst@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/common/mtk-soundcard-driver.c