Re: [PATCH v2 1/4] pinctrl: sprd: free maps on DT map failure

From: Linus Walleij

Date: Wed Oct 07 2026 - 06:44:16 EST


On Sat, Oct 3, 2026 at 10:32 AM Jiale Yao <yaojiale02@xxxxxxx> wrote:

> sprd_dt_node_to_map() reserves map storage before adding mux and
> configuration entries. If a later operation fails, the error path only
> frees the temporary configurations and leaves the map allocation reachable
> through the output pointer.
>
> Free the partially built map on failure. 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.
>
> Fixes: 41d32cfce1ae ("pinctrl: sprd: Add Spreadtrum pin control driver")
> Signed-off-by: Jiale Yao <yaojiale02@xxxxxxx>
> Reviewed-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>

Patch applied.

Yours,
Linus Walleij