From patchwork Thu Jun 26 11:26:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4427251 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 70F53BEECB for ; Thu, 26 Jun 2014 11:28:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AC7AF20381 for ; Thu, 26 Jun 2014 11:27:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E69B320379 for ; Thu, 26 Jun 2014 11:27:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X07oq-00022g-LV; Thu, 26 Jun 2014 11:26:20 +0000 Received: from mail-wg0-f45.google.com ([74.125.82.45]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X07oU-0001dD-2A for linux-arm-kernel@lists.infradead.org; Thu, 26 Jun 2014 11:26:00 +0000 Received: by mail-wg0-f45.google.com with SMTP id l18so3396316wgh.28 for ; Thu, 26 Jun 2014 04:25:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1nL9Y0lR7SteWgNNCb4/ja6DpKBPxH2gJLpoUoa0Tik=; b=MUinq+IeyjR5RKUC+mkpplbrzltQvSwubya6KpyG55vkYTcT/T9OZpLXMQ1R3cB/x/ 2YZyXIfOTDE9bee0v/R7YoKGNuFu4ugA8S4l2Gg4E+XD04hQUDaX3tr/SOdgkUZCzpwF gwjMMihIM9luUZniy25cllKwT+CzRotW6rFbQJCzBBPR9wvgaToS/Hcm3RnEE964wbkK awDHt7eqWuuT+RlB+9pqzMNnlnBQGtVgpGP82OfFWfBozJL3GxwfTOhdAGjmbTnXq35S 15ma0tx3dvw9jDm7QHN0YHgjJ6Hex2XuCF8EjGN6KNOSGbfyM0AMfGUOrYN3ac9C6VeV MUUg== X-Gm-Message-State: ALoCoQlesXoseWzHlXjIb7gsD9VfuRhwl77jxrurVjrUBuHur1ltDTqACltM05a5Oy4+is68cypB X-Received: by 10.180.187.111 with SMTP id fr15mr3595988wic.57.1403781934664; Thu, 26 Jun 2014 04:25:34 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id fq2sm23463079wib.2.2014.06.26.04.25.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jun 2014 04:25:33 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Linus Walleij Subject: [PATCH] pinctrl: pinctrl-at91.c: Cleaning up if unsigned is less than zero Date: Thu, 26 Jun 2014 13:26:45 +0200 Message-Id: <1403782005-9853-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140626_042558_289078_3912BB33 X-CRM114-Status: GOOD ( 10.76 ) X-Spam-Score: -0.7 (/) Cc: devicetree@vger.kernel.org, Rickard Strandqvist , linux-kernel@vger.kernel.org, Rob Herring , Grant Likely , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/pinctrl/pinctrl-at91.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 421493c..17ef8b3 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -945,7 +945,7 @@ static int at91_pinctrl_parse_functions(struct device_node *np, /* Initialise function */ 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; }