Re: [PATCH v2 2/4] pinctrl: renesas: rzn1: free maps on DT map failure
From: Geert Uytterhoeven
Date: Mon Oct 19 2026 - 11:22:36 EST
On Sat, 3 Oct 2026 at 10:32, Jiale Yao <yaojiale02@xxxxxxx> wrote:
> rzn1_dt_node_to_map_one() appends mappings for each DT node. If a
> node fails after map storage has been reserved, the top-level callback
> returns without releasing mappings built for the current and previous
> nodes.
>
> Free the accumulated map on every error path. The caller ignores the
> output parameters when the mapping callback returns an error, so they do
> not need to be reset after freeing the map.
>
> Signed-off-by: Jiale Yao <yaojiale02@xxxxxxx>
Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
i.e. will queue in renesas-pinctrl for v7.5.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds