Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}