Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757903Ab3ENPA0 (ORCPT ); Tue, 14 May 2013 11:00:26 -0400 Received: from perceval.ideasonboard.com ([95.142.166.194]:44811 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752917Ab3ENPAY (ORCPT ); Tue, 14 May 2013 11:00:24 -0400 From: Laurent Pinchart To: John Crispin Cc: Linus Walleij , linux-kernel@vger.kernel.org Subject: [PATCH] pinctrl/lantiq: Free mapping configs for both pin and groups Date: Tue, 14 May 2013 17:00:38 +0200 Message-Id: <1368543638-3299-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 1.8.1.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1103 Lines: 32 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 --- drivers/pinctrl/pinctrl-lantiq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-lantiq.c b/drivers/pinctrl/pinctrl-lantiq.c index 615c500..d22ca25 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); } -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/