From patchwork Fri Nov 16 06:50:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 12890 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 87D4D23E13 for ; Fri, 16 Nov 2012 06:57:21 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 18F03A19CDE for ; Fri, 16 Nov 2012 06:57:20 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so1430377iag.11 for ; Thu, 15 Nov 2012 22:57:20 -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=Y/YOrko4norwY6q3Zd7ir3IWWkwgw4wvzHY6n2XxImA=; b=QObBVQvoza9p1VNlcftF/HMR37fLkie//G5ObT7e3s6A1jJeO0aGcte9aI0T2XPzm4 Tv16WcFTqmjGZFrLl53Oa13oIxGeuS1J040By0dTU/17zf6FMnjpX0JNwYFS5Tdba3z/ FlaEBYRy7U0acjUumwRxjHY2vAW+sKUzwK3+CiXlqaqpsopjsTrZqIslvHqZh+lPEsIX CVZW3ojmc2snLvmBmjIkNMx2yDprMD3/keKhKHe9ZaWo7UDQQAHYuWXKIhl77X43Hpmi vPimkcmubuQVfylDmzERbfzMnS2fXlr1HIenpxmyCMcv/DeUf16ALSBwxu7fDx0MmMbw 3TxA== Received: by 10.50.213.34 with SMTP id np2mr2232263igc.57.1353049040460; Thu, 15 Nov 2012 22:57:20 -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 n20csp23354igt; Thu, 15 Nov 2012 22:57:20 -0800 (PST) Received: by 10.68.137.136 with SMTP id qi8mr11946386pbb.148.1353049039948; Thu, 15 Nov 2012 22:57:19 -0800 (PST) Received: from mail-pb0-f45.google.com (mail-pb0-f45.google.com [209.85.160.45]) by mx.google.com with ESMTPS id tp3si1462861pbc.355.2012.11.15.22.57.19 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 22:57:19 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.45 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.160.45; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.45 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-pb0-f45.google.com with SMTP id mc8so1680676pbc.4 for ; Thu, 15 Nov 2012 22:57:19 -0800 (PST) Received: by 10.66.80.65 with SMTP id p1mr10313505pax.20.1353049039721; Thu, 15 Nov 2012 22:57:19 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id mz10sm753915pbc.37.2012.11.15.22.57.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Nov 2012 22:57:19 -0800 (PST) From: Tushar Behera To: linux-kernel@vger.kernel.org Cc: patches@linaro.org, Linus Walleij Subject: [PATCH 07/14] pinctrl: SPEAr: Update error check for unsigned variables Date: Fri, 16 Nov 2012 12:20:39 +0530 Message-Id: <1353048646-10935-8-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: ALoCoQnDXu9Oypt8zQle5O1QK+c+8idtvn5C9LbG/QR9VDTHPZTtx5+U9Mf9hxCdZitKk/m1txV7 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: Viresh Kumar --- drivers/pinctrl/spear/pinctrl-plgpio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c index 1044ad3..9e0c731 100644 --- a/drivers/pinctrl/spear/pinctrl-plgpio.c +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c @@ -283,7 +283,7 @@ static int plgpio_to_irq(struct gpio_chip *chip, unsigned offset) { struct plgpio *plgpio = container_of(chip, struct plgpio, chip); - if (plgpio->irq_base < 0) + if (IS_ERR_VALUE(plgpio->irq_base)) return -EINVAL; return irq_find_mapping(plgpio->irq_domain, offset);