From: Laurent Pinchart Date: Tue, 14 May 2013 15:00:38 +0000 (+0200) Subject: pinctrl/lantiq: Free mapping configs for both pin and groups X-Git-Tag: v3.10-rc2~4^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1dda2fa650da12a644c7cc8645707c912bdc5ab8;p=thirdparty%2Fkernel%2Flinux.git 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 Acked-by: John Crispin Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pinctrl-lantiq.c b/drivers/pinctrl/pinctrl-lantiq.c index 615c5002b757e..d22ca252b80d4 100644 --- a/drivers/pinctrl/pinctrl-lantiq.c +++ b/drivers/pinctrl/pinctrl-lantiq.c @@ -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); }