From: davidb@codeaurora.org (David Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] drivers: gpio: msm: Fix the error condition for reading ngpio
Date: Thu, 18 Jul 2013 13:07:14 -0700 [thread overview]
Message-ID: <1374178035-19943-3-git-send-email-davidb@codeaurora.org> (raw)
In-Reply-To: <1374178035-19943-1-git-send-email-davidb@codeaurora.org>
From: Rohit Vaswani <rvaswani@codeaurora.org>
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 <rvaswani@codeaurora.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Pankaj Jangra <jangra.pankaj9@gmail.com>
Cc: "Bird, Tim" <Tim.Bird@sonymobile.com>
Signed-off-by: David Brown <davidb@codeaurora.org>
---
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
next prev parent reply other threads:[~2013-07-18 20:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 20:07 [PATCH 0/3] MSM gpio fixes David Brown
2013-07-18 20:07 ` [PATCH 1/3] ARM: msm: dts: Fix the gpio register address for msm8960 David Brown
2013-07-18 20:07 ` David Brown [this message]
2013-07-18 20:07 ` [PATCH 3/3] ARM: msm: Consolidate gpiomux for older architectures David Brown
2013-07-20 20:54 ` [PATCH 0/3] MSM gpio fixes Linus Walleij
2013-07-24 22:41 ` David Brown
2013-07-25 9:35 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1374178035-19943-3-git-send-email-davidb@codeaurora.org \
--to=davidb@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).