Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dda2fa6 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Linus Walleij
Browse files

pinctrl/lantiq: Free mapping configs for both pin and groups



When creating mappings from DT both pin config and group config mappings
are allocated. Free them both when destroying the mappings.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: default avatarJohn Crispin <blogic@openwrt.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 18442e65
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -52,7 +52,8 @@ static void ltq_pinctrl_dt_free_map(struct pinctrl_dev *pctldev,
	int i;
	int i;


	for (i = 0; i < num_maps; i++)
	for (i = 0; i < num_maps; i++)
		if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN)
		if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN ||
		    map[i].type == PIN_MAP_TYPE_CONFIGS_GROUP)
			kfree(map[i].data.configs.configs);
			kfree(map[i].data.configs.configs);
	kfree(map);
	kfree(map);
}
}