gpio: propagate of_parse_phandle_with_args errors

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>
This commit is contained in:
Alexandre Courbot 2012-06-29 13:57:59 +09:00 committed by Linus Walleij
parent f447ed8b31
commit 41920d1636

View 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);