From patchwork Fri Nov 16 06:50:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 12889 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9107023E13 for ; Fri, 16 Nov 2012 06:57:19 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5A692A19389 for ; Fri, 16 Nov 2012 06:57:18 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so3064408iej.11 for ; Thu, 15 Nov 2012 22:57:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=As1pUuVa5hKx/DuI81ZOlJR8Qw0FZy3ORs/lcqSRAPU=; b=b9/4wHdACJxS/bEXju+xCMKjEUeop6RbSnjVor0pLioY5MG1X1WKx/I+0LJA94t9uk UVrPSbX3+sgegdBfqaJUTMGudZobYwcgPN2oi7LPuJ3gW+1cAWs6TKO9GQTCFItz/KtK RFVceveNBqq6BQbKN5mJeBW1aPIdL4jfIQma7k8t28/ZcpRASF2ZQCL/GVuAgFw0gVPm QigDujeoy+pAPodt5kSOUXUqEZZGvDPyUUyu07b9AuBXUYnJz9V5NbgSp75L5vL7dbVn 0+hveaxO9ppjNw4xOpJNVzDa54wXHLM1S9omSillirU6A/Cx3lE3Qzz7uGCnPOAFqvyr BMeQ== Received: by 10.50.187.197 with SMTP id fu5mr2206658igc.70.1353049037884; Thu, 15 Nov 2012 22:57:17 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp23348igt; Thu, 15 Nov 2012 22:57:17 -0800 (PST) Received: by 10.66.85.66 with SMTP id f2mr10194418paz.56.1353049037326; Thu, 15 Nov 2012 22:57:17 -0800 (PST) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by mx.google.com with ESMTPS id q7si1170364paw.69.2012.11.15.22.57.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 22:57:17 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.220.41; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.41 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) smtp.mail=tushar.behera@linaro.org Received: by mail-pa0-f41.google.com with SMTP id fa10so1764182pad.0 for ; Thu, 15 Nov 2012 22:57:17 -0800 (PST) Received: by 10.68.233.197 with SMTP id ty5mr12481587pbc.9.1353049037038; Thu, 15 Nov 2012 22:57:17 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id mz10sm753915pbc.37.2012.11.15.22.57.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 22:57:16 -0800 (PST) From: Tushar Behera To: linux-kernel@vger.kernel.org Cc: patches@linaro.org, Linus Walleij Subject: [PATCH 06/14] pinctrl: samsung: Update error check for unsigned variables Date: Fri, 16 Nov 2012 12:20:38 +0530 Message-Id: <1353048646-10935-7-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353048646-10935-1-git-send-email-tushar.behera@linaro.org> References: <1353048646-10935-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQk0l1R1WwImpw4tuSVKKfT6knyqWTKCRS6qvdvMTJFkrecjCoNTlb9pXGVSYvaYK8nNzy4Q Checking '< 0' for unsigned variables always returns false. For error codes, use IS_ERR_VALUE() instead. CC: Linus Walleij Signed-off-by: Tushar Behera Acked-by: Linus Walleij --- drivers/pinctrl/pinctrl-samsung.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c index 81c9896..3b52c17 100644 --- a/drivers/pinctrl/pinctrl-samsung.c +++ b/drivers/pinctrl/pinctrl-samsung.c @@ -560,7 +560,7 @@ static int __devinit samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, const char *pin_name; *npins = of_property_count_strings(cfg_np, "samsung,pins"); - if (*npins < 0) { + if (IS_ERR_VALUE(*npins)) { dev_err(dev, "invalid pin list in %s node", cfg_np->name); return -EINVAL; }