mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Pankaj Jangra <[email protected]> Cc: "Bird, Tim" <[email protected]> Signed-off-by: David Brown <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
949eb1a4d2
commit
afe8ce9b29
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue