Skip to content

Commit

Permalink
drivers: gpio: msm: Fix the error condition for reading ngpio
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rohit Vaswani authored and Linus Walleij committed Jul 20, 2013
1 parent 949eb1a commit afe8ce9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-msm-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit afe8ce9

Please sign in to comment.