[PATCH] pinctrl: imx1: fix device_node leak in dt_is_flat_functions()
Linus Walleij
linusw at kernel.org
Tue May 26 02:46:04 PDT 2026
On Sat, May 23, 2026 at 12:27 PM Felix Gu <ustc.gu at gmail.com> wrote:
> for_each_child_of_node() holds a reference on the iterator node that
> must be released on early return. imx1_pinctrl_dt_is_flat_functions()
> has two early return paths inside the loop that skip this cleanup.
>
> Replace both loops with the scoped variant so that the reference is
> automatically dropped when the iterator goes out of scope.
>
> Fixes: 63d2059cd665 ("pinctrl: imx1: Allow parsing DT without function nodes")
> Signed-off-by: Felix Gu <ustc.gu at gmail.com>
So what we got here is a non-critical patch on top of something that was
critical and was merged as fixes. (A minor memory leak is not critical
and not -rc material.)
Linus (the big penguin) has been annoyed of too many noncritical
patches going in as fixes recently so can you please resend this after
the next merge window? (I will try to remember the patch as well.)
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list