[PATCH 2/3] pinctrl: bcm: Use pinconf_generic_dt_free_map in bcm2835
Florian Fainelli
florian.fainelli at broadcom.com
Tue Nov 10 09:48:43 PST 2026
On 11/5/26 23:06, Wang Xiaolei wrote:
> Replace the hand-written dt_free_map callback with the generic
> pinconf_generic_dt_free_map() helper, which wraps
> pinctrl_utils_free_map(). This drops the duplicated free loop and
> handles both CONFIGS_PIN and CONFIGS_GROUP map types.
>
> The error path in bcm2835_pctl_dt_node_to_map() uses the same helper.
> The driver already selects GENERIC_PINCONF, so no Kconfig change is
> needed.
>
> Signed-off-by: Wang Xiaolei <wangxiaolei01 at kaihong.com>
I think this deserves a Fixes: tag because it fixes a memory leak,
generic allocation can allocate PIN_MAP_TYPE_CONFIGS_GROUP, but the
custom callback does not free that allocation type:
Fixes: 0de704955ee4 ("pinctrl: bcm2835: Add support for generic pinctrl
binding")
Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
--
Florian
More information about the linux-arm-kernel
mailing list