Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934314Ab3GRUHq (ORCPT ); Thu, 18 Jul 2013 16:07:46 -0400 Received: from smtp.codeaurora.org ([198.145.11.231]:49715 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759102Ab3GRUHk (ORCPT ); Thu, 18 Jul 2013 16:07:40 -0400 From: David Brown To: Grant Likely , Linus Walleij Cc: Rohit Vaswani , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, "Bird, Tim" , David Brown 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> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1357 Lines: 36 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; } -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation -- 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/