Skip to content

Commit

Permalink
pinctrl/lantiq: Free mapping configs for both pin and groups
Browse files Browse the repository at this point in the history
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 <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Laurent Pinchart authored and Linus Walleij committed May 15, 2013
1 parent 18442e6 commit 1dda2fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/pinctrl/pinctrl-lantiq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 1dda2fa

Please sign in to comment.