diff options
| author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-05-14 11:00:38 -0400 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2013-05-15 07:28:46 -0400 |
| commit | 1dda2fa650da12a644c7cc8645707c912bdc5ab8 (patch) | |
| tree | 5f6c5db5d4697e99d2b59d4b94b67d5d84e1d067 | |
| parent | 18442e65d424dc84a4a4a3b635eb1a52de3cb6b4 (diff) | |
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 <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| -rw-r--r-- | drivers/pinctrl/pinctrl-lantiq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-lantiq.c b/drivers/pinctrl/pinctrl-lantiq.c index 615c5002b757..d22ca252b80d 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, | |||
| 52 | int i; | 52 | int i; |
| 53 | 53 | ||
| 54 | for (i = 0; i < num_maps; i++) | 54 | for (i = 0; i < num_maps; i++) |
| 55 | if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN) | 55 | if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN || |
| 56 | map[i].type == PIN_MAP_TYPE_CONFIGS_GROUP) | ||
| 56 | kfree(map[i].data.configs.configs); | 57 | kfree(map[i].data.configs.configs); |
| 57 | kfree(map); | 58 | kfree(map); |
| 58 | } | 59 | } |
