summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-msm-v2.c
diff options
context:
space:
mode:
authorRohit Vaswani <rvaswani@codeaurora.org>2013-07-18 13:07:14 -0700
committerLinus Walleij <linus.walleij@linaro.org>2013-07-20 23:33:33 +0200
commitafe8ce9b29c487ea7f62faa936b6abb84e0b8815 (patch)
treeb721a42706f544aac2f290b7e4ef05a83da5128e /drivers/gpio/gpio-msm-v2.c
parent949eb1a4d29dc75e0b5b16b03747886b52ecf854 (diff)
drivers: gpio: msm: Fix the error condition for reading ngpio
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> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-msm-v2.c')
-rw-r--r--drivers/gpio/gpio-msm-v2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-msm-v2.c b/drivers/gpio/gpio-msm-v2.c
index f4491a497cc8..c2fa77086eb5 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;
}