Commit afe8ce9b29c487ea7f62faa936b6abb84e0b8815
Committed by
Linus Walleij
1 parent
949eb1a4d2
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
drivers/gpio/gpio-msm-v2.c
... | ... | @@ -378,7 +378,7 @@ |
378 | 378 | int ret, ngpio; |
379 | 379 | struct resource *res; |
380 | 380 | |
381 | - if (!of_property_read_u32(pdev->dev.of_node, "ngpio", &ngpio)) { | |
381 | + if (of_property_read_u32(pdev->dev.of_node, "ngpio", &ngpio)) { | |
382 | 382 | dev_err(&pdev->dev, "%s: ngpio property missing\n", __func__); |
383 | 383 | return -EINVAL; |
384 | 384 | } |