From patchwork Thu Jul 18 20:07:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Brown X-Patchwork-Id: 2829862 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DACC79F4D4 for ; Thu, 18 Jul 2013 20:09:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03BDE202C7 for ; Thu, 18 Jul 2013 20:09:58 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 07F0A202BC for ; Thu, 18 Jul 2013 20:09:57 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UzuVN-0005kc-92; Thu, 18 Jul 2013 20:08:50 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UzuV3-0004AB-5F; Thu, 18 Jul 2013 20:08:29 +0000 Received: from smtp.codeaurora.org ([198.145.11.231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UzuUY-00046h-OF for linux-arm-kernel@lists.infradead.org; Thu, 18 Jul 2013 20:08:00 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 7BE9213F116; Thu, 18 Jul 2013 20:07:40 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 6DCFB13F11B; Thu, 18 Jul 2013 20:07:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from codeaurora.org (i-global252.qualcomm.com [199.106.103.252]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: davidb@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id B239013F116; Thu, 18 Jul 2013 20:07:39 +0000 (UTC) From: David Brown To: Grant Likely , Linus Walleij Subject: [PATCH 2/3] drivers: gpio: msm: Fix the error condition for reading ngpio Date: Thu, 18 Jul 2013 13:07:14 -0700 Message-Id: <1374178035-19943-3-git-send-email-davidb@codeaurora.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1374178035-19943-1-git-send-email-davidb@codeaurora.org> References: <1374178035-19943-1-git-send-email-davidb@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130718_160758_848296_0ED7C784 X-CRM114-Status: GOOD ( 16.04 ) X-Spam-Score: -2.2 (--) Cc: linux-arm-msm@vger.kernel.org, "Bird, Tim" , Rohit Vaswani , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, David Brown , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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-Virus-Scanned: ClamAV using ClamSMTP From: Rohit Vaswani of_property_read_u32 return 0 on success. The check was using a ! to return error. Fix the if condition. Signed-off-by: Rohit Vaswani Acked-by: Linus Walleij Reviewed-by: Pankaj Jangra Cc: "Bird, Tim" Signed-off-by: David Brown --- drivers/gpio/gpio-msm-v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-msm-v2.c b/drivers/gpio/gpio-msm-v2.c index f4491a4..c2fa770 100644 --- a/drivers/gpio/gpio-msm-v2.c +++ b/drivers/gpio/gpio-msm-v2.c @@ -378,7 +378,7 @@ static int msm_gpio_probe(struct platform_device *pdev) int ret, ngpio; struct resource *res; - if (!of_property_read_u32(pdev->dev.of_node, "ngpio", &ngpio)) { + if (of_property_read_u32(pdev->dev.of_node, "ngpio", &ngpio)) { dev_err(&pdev->dev, "%s: ngpio property missing\n", __func__); return -EINVAL; }