]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
gpio: propagate of_parse_phandle_with_args errors
authorAlexandre Courbot <acourbot@nvidia.com>
Fri, 29 Jun 2012 04:57:59 +0000 (13:57 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 17 Jul 2012 19:00:15 +0000 (21:00 +0200)
Make of_get_named_gpio_flags propagate any error it receives from
of_parse_phandle_with_args instead of inconditionally returning -EINVAL.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-of.c

index 8389d4a0ec45beac0fdade50c6ceaba4c2dfcaa6..a71aecac451f5fbdfaf3da7b2ef17adf0a8076f2 100644 (file)
@@ -73,7 +73,7 @@ int of_get_named_gpio_flags(struct device_node *np, const char *propname,
                                         &gg_data.gpiospec);
        if (ret) {
                pr_debug("%s: can't parse gpios property\n", __func__);
-               return -EINVAL;
+               return ret;
        }
 
        gpiochip_find(&gg_data, of_gpiochip_find_and_xlate);