[2/4] drivers: gpio: msm: Fix the error condition for reading ngpio
diff mbox series

Message ID 1371603747-27436-3-git-send-email-rvaswani@codeaurora.org
State New, archived
Headers show
Series
  • ARM: MSM: Consolidate GPIOMUX for 7x30 and 8x50
Related show

Commit Message

Rohit Vaswani June 19, 2013, 1:02 a.m. UTC
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>
---
 drivers/gpio/gpio-msm-v2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Linus Walleij June 19, 2013, 7:45 p.m. UTC | #1
On Wed, Jun 19, 2013 at 3:02 AM, Rohit Vaswani <rvaswani@codeaurora.org> wrote:

> 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>

I guess this is going through the MSM tree as well?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Rohit Vaswani June 19, 2013, 7:50 p.m. UTC | #2
On 6/19/2013 12:45 PM, Linus Walleij wrote:
> On Wed, Jun 19, 2013 at 3:02 AM, Rohit Vaswani <rvaswani@codeaurora.org> wrote:
>
>> 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>
>
> I guess this is going through the MSM tree as well?
>
> Yours,
> Linus Walleij
Yes, going through MSM tree.

Thanks,
Rohit Vaswani

Patch
diff mbox series

diff --git a/drivers/gpio/gpio-msm-v2.c b/drivers/gpio/gpio-msm-v2.c
index f4491a4..c2fa770 100644
--- a/drivers/gpio/gpio-msm-v2.c
+++ b/drivers/gpio/gpio-msm-v2.c
@@ -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;
 	}