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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 29 Jan 2015 14:44:19 +0000 (15:44 +0100)
commit72464765733575dc89c509f16caabc2af47fda79
tree48ce5f4b184e89e3533459eb3ff828c56765f2d7
parentd43170104637ad8499f686064d08c49176fe1243
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: Jiri Slaby <jslaby@suse.cz>
drivers/gpio/gpiolib-of.c