Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757841Ab3EGMLR (ORCPT ); Tue, 7 May 2013 08:11:17 -0400 Received: from mail-qa0-f44.google.com ([209.85.216.44]:50135 "EHLO mail-qa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756681Ab3EGMLP (ORCPT ); Tue, 7 May 2013 08:11:15 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 7 May 2013 20:11:13 +0800 Message-ID: Subject: Re: [PATCH] pinctrl: single: fix error return code in pcs_parse_one_pinctrl_entry() From: Haojian Zhuang To: Wei Yongjun Cc: Linus Walleij , grant.likely@linaro.org, Rob Herring , yongjun_wei@trendmicro.com.cn, linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1615 Lines: 40 On 7 May 2013 20:06, Wei Yongjun wrote: > From: Wei Yongjun > > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. > > Introduced by commit 9dddb4df90d136429b6d6ddefceb49a9b93f6cd1 > (pinctrl: single: support generic pinconf) > > Signed-off-by: Wei Yongjun > --- > drivers/pinctrl/pinctrl-single.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c > index 5f2d2bf..b9fa046 100644 > --- a/drivers/pinctrl/pinctrl-single.c > +++ b/drivers/pinctrl/pinctrl-single.c > @@ -1166,7 +1166,8 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs, > (*map)->data.mux.function = np->name; > > if (pcs->is_pinconf) { > - if (pcs_parse_pinconf(pcs, np, function, map)) > + res = pcs_parse_pinconf(pcs, np, function, map); > + if (res) > goto free_pingroups; > *num_maps = 2; > } else { > It seems that you don't change anything. pcs_parse_pinconf() returns either 0 or negative value. If it returns negative value, it will goto free_pingroups label w/wo your change. So I don't understand why your change is necessary. -- 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/