Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757696AbaFZMEt (ORCPT ); Thu, 26 Jun 2014 08:04:49 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:41312 "EHLO mx08-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757576AbaFZMEr (ORCPT ); Thu, 26 Jun 2014 08:04:47 -0400 Message-ID: <53AC0C22.9010108@st.com> Date: Thu, 26 Jun 2014 14:03:46 +0200 From: Maxime Coquelin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Rickard Strandqvist , Srinivas Kandagatla Cc: Patrice Chotard , Linus Walleij , Grant Likely , Rob Herring , , , , Subject: Re: [PATCH] pinctrl: pinctrl-st.c: Cleaning up if unsigned is less than zero References: <1403782369-10201-1-git-send-email-rickard_strandqvist@spectrumdigital.se> In-Reply-To: <1403782369-10201-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.201.23.80] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52,1.0.14,0.0.0000 definitions=2014-06-26_04:2014-06-26,2014-06-26,1970-01-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rickard, On 06/26/2014 01:32 PM, Rickard Strandqvist wrote: > Remove checking if a unsigned is less than zero > > This was found using a static code analysis program called > cppcheck. > > Signed-off-by: Rickard Strandqvist > You can add my: Acked-by: Maxime Coquelin Thanks, Maxime > --- drivers/pinctrl/pinctrl-st.c | 2 +- 1 file changed, 1 > insertion(+), 1 deletion(-) > > diff --git a/drivers/pinctrl/pinctrl-st.c > b/drivers/pinctrl/pinctrl-st.c index 1bd6363bc9..f4ee1b1 100644 --- > a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c > @@ -1256,7 +1256,7 @@ static int st_pctl_parse_functions(struct > device_node *np, func = &info->functions[index]; func->name = > np->name; func->ngroups = of_get_child_count(np); - if > (func->ngroups <= 0) { + if (func->ngroups == 0) { > dev_err(info->dev, "No groups defined\n"); return -EINVAL; } > -- 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/