gpiolib: of: Correct error handling in of_get_named_gpiod_flags
authorHans Holmberg <hans.holmberg@intel.com>
Fri, 9 Jan 2015 08:40:43 +0000 (09:40 +0100)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:06:00 +0000 (13:06 +0000)
commit5ab6c597000fbcfffabcc716d301aa8918ccac04
treefe9730562bcd01ba2ecdfa2711cf266cd46a55b7
parent3e8ad7558f47e2ec89a0e54fa4bf177942f3b44f
gpiolib: of: Correct error handling in of_get_named_gpiod_flags

commit 7b8792bbdffdff3abda704f89c6a45ea97afdc62 upstream.

of_get_named_gpiod_flags fails with -EPROBE_DEFER in cases
where the gpio chip is available and the GPIO translation fails.

This causes drivers to be re-probed erroneusly, and hides the
real problem(i.e. the GPIO number being out of range).

Signed-off-by: Hans Holmberg <hans.holmberg@intel.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpiolib-of.c