From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756088AbcKKI3S (ORCPT ); Fri, 11 Nov 2016 03:29:18 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:47559 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755190AbcKKI3R (ORCPT ); Fri, 11 Nov 2016 03:29:17 -0500 Date: Fri, 11 Nov 2016 09:29:14 +0100 From: Maxime Ripard To: Chen-Yu Tsai Cc: Linus Walleij , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH] pinctrl: sunxi: Free configs in pinctrl_map only if it is a config map Message-ID: <20161111082914.yz52rlhevzvnoac3@lukather> References: <20161111023510.14146-1-wens@csie.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pzi45ornuiwhdy4r" Content-Disposition: inline In-Reply-To: <20161111023510.14146-1-wens@csie.org> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pzi45ornuiwhdy4r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 11, 2016 at 10:35:10AM +0800, Chen-Yu Tsai wrote: > In the recently refactored sunxi pinctrl library, we are only allocating > one set of pin configs for each pinmux setting node. When the pinctrl_map > structure is freed, the pin configs should also be freed. However the > code assumed the first map would contain the configs, which actually > never happens, as the mux function map gets added first. >=20 > The proper way to do this is to look through all the maps and free the > first one whose type is actually PIN_MAP_TYPE_CONFIGS_GROUP. >=20 > Also slightly expand the comment explaining this. >=20 > Fixes: f233dbca6227 ("pinctrl: sunxi: Rework the pin config building code= ") > Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Thanks! Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --pzi45ornuiwhdy4r Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYJYFWAAoJEBx+YmzsjxAg830QAKwLy8FMPyRtevFgOyCq+9aK htcUJb7vkQ/5IoPcm8rGNn7uEVwwaAebv6Uuh7KJ2ifojn531dsXkAnhlhElpBSo VxpgPW/Wpw+qb2j2V2jg2OSw69XRSACoxDefsuc3LIsmR/NsZIecx6rRW8mwBkX+ Zb0LLtvQNHjnAGAYr/HJ+wpoPR69TUhRPOePVYoubNodYfAuAJ1qxdKqUd5Wj5ph u52EdZvs0YsK77uJ1OrKOVJJ4mn4i1nSUxsDGE7x8Ai/shcIYN7DGogYykN2ojg6 CiXAgpUNWCm0/4Z9i7/6v8Sju35xmciIQfKcbjlDS22IKpJCNQg1Mn10QAiNLNUz qAWPO+wqpi0HHTNpkPasRrfDUcU6jVVfNER9D8O+lZMqR/2TY0E5ExY+2tFhqxfV M0E3syqSSJPPDP759TzkCbE86+RYznuMxe4xCaOgJ3Bna/jTgMRHkxjJd6Y1z+cr RcxlWa1VIoNnrTsJfmNPTSS6kErEOscTNZaqrui4+R8SPp57pLDkU/JL4zsblVr6 uEt8kpO1a5yGVfi7ZDu7sjDVpS3sHnibr5WhlbeuYdwfPvJ7b0jnZeKJYOaGvLnf QFP0boXoB3+jwvpZjc7VQhISJ69JNbg/nqgubQgpXWrtb4TwPFfyU43M9cyPhXRK STW+11tnLrDlY2jlFPRN =tvXV -----END PGP SIGNATURE----- --pzi45ornuiwhdy4r--