From patchwork Wed Nov 25 12:13:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yingjoe Chen X-Patchwork-Id: 57296 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2699043lbb; Wed, 25 Nov 2015 04:13:34 -0800 (PST) X-Received: by 10.98.10.83 with SMTP id s80mr21842157pfi.79.1448453614205; Wed, 25 Nov 2015 04:13:34 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y17si34041036pfi.165.2015.11.25.04.13.33; Wed, 25 Nov 2015 04:13:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753650AbbKYMNc (ORCPT + 28 others); Wed, 25 Nov 2015 07:13:32 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:48654 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753454AbbKYMNa (ORCPT ); Wed, 25 Nov 2015 07:13:30 -0500 X-Listener-Flag: 11101 Received: from mtkhts07.mediatek.inc [(172.21.101.69)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1684480518; Wed, 25 Nov 2015 20:13:26 +0800 Received: from mtksdtcf02.mediatek.inc (10.21.12.142) by mtkhts07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.181.6; Wed, 25 Nov 2015 20:13:24 +0800 From: Yingjoe Chen To: Linus Walleij CC: , , , , Yingjoe Chen Subject: [PATCH] pinctrl: update document for pinconf_generic_parse_dt_config Date: Wed, 25 Nov 2015 20:13:23 +0800 Message-ID: <1448453603-38980-1-git-send-email-yingjoe.chen@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The returned configs from pinconf_generic_parse_dt_config() is duplicated from original. Make it clear it must be freed when no longer necessary. Signed-off-by: Yingjoe Chen --- It seems memleak in pinctrl-mtk-common.c[1] is not alone. After a quick glance I notice similar issues in drivers/pinctrl/pinctrl-at91-pio4.c and drivers/pinctrl/nomadik/pinctrl-abx500.c. I think it make sense to update document to make it clear it should be freed. [1] http://lists.infradead.org/pipermail/linux-mediatek/2015-November/002967.html --- drivers/pinctrl/pinconf-generic.c | 1 + 1 file changed, 1 insertion(+) -- 1.9.1 -- 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/ diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c index 099a344..79e6159 100644 --- a/drivers/pinctrl/pinconf-generic.c +++ b/drivers/pinctrl/pinconf-generic.c @@ -220,6 +220,7 @@ static void parse_dt_cfg(struct device_node *np, * parse the config properties into generic pinconfig values. * @np: node containing the pinconfig properties * @configs: array with nconfigs entries containing the generic pinconf values + * must be freed when no longer necessary. * @nconfigs: umber of configurations */ int pinconf_generic_parse_dt_config(struct device_node *np,