提交 afe8ce9b 编写于 作者: R Rohit Vaswani 提交者: 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: NRohit Vaswani <rvaswani@codeaurora.org>
Acked-by: NLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: NPankaj Jangra  <jangra.pankaj9@gmail.com>
Cc: "Bird, Tim" <Tim.Bird@sonymobile.com>
Signed-off-by: NDavid Brown <davidb@codeaurora.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册