Re: [PATCH v2] ASoC: mediatek: common: Switch to for_each_available_child_of_node_scoped()
From: Fei Shao
Date: Tue Aug 26 2025 - 01:16:59 EST
On Mon, Aug 25, 2025 at 11:55 PM Chen-Yu Tsai <wenst@xxxxxxxxxxxx> 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@xxxxxxxxxxxx>
> ---
> 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@xxxxxxxxxxxx>