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: Laurent Pinchart <[email protected]>
Acked-by: John Crispin <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
Laurent Pinchart 2013-05-14 17:00:38 +02:00 • committed by Linus Walleij
commit 1dda2fa650

View file

@ -52,7 +52,8 @@ static void ltq_pinctrl_dt_free_map(struct pinctrl_dev *pctldev,
int 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);
}