Commit afe8ce9b authored by Rohit Vaswani's avatar Rohit Vaswani Committed by Linus Walleij

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: default avatarRohit Vaswani <rvaswani@codeaurora.org>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarPankaj Jangra  <jangra.pankaj9@gmail.com>
Cc: "Bird, Tim" <Tim.Bird@sonymobile.com>
Signed-off-by: default avatarDavid Brown <davidb@codeaurora.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 949eb1a4
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment