[PATCH v2] ASoC: mediatek: common: Switch to for_each_available_child_of_node_scoped()
Fei Shao
fshao at chromium.org
Mon Aug 25 22:16:09 PDT 2025
On Mon, Aug 25, 2025 at 11:55 PM Chen-Yu Tsai <wenst at chromium.org> wrote:
>
> 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 at chromium.org>
> ---
> Changes since v1:
> - Dropped unused variable
> ---
> .../mediatek/common/mtk-soundcard-driver.c | 19 +++++--------------
> 1 file changed, 5 insertions(+), 14 deletions(-)
Reviewed-by: Fei Shao <fshao at chromium.org>
More information about the Linux-mediatek
mailing list