Messages in this thread | | | From | Linus Walleij <> | Date | Mon, 8 Apr 2019 13:12:44 +0200 | Subject | Re: [PATCH] spi: Add missing error handling for CS GPIOs |
| |
On Wed, Apr 3, 2019 at 4:46 PM Geert Uytterhoeven <geert+renesas@glider.be> wrote:
> While devm_gpiod_get_index_optional() returns NULL if the GPIO is not > present (i.e. -ENOENT), it may still return other error codes, like > -EPROBE_DEFER. Currently these are not handled, leading to > unrecoverable failures later in case of probe deferral: > > gpiod_set_consumer_name: invalid GPIO (errorpointer) > gpiod_direction_output: invalid GPIO (errorpointer) > gpiod_set_value_cansleep: invalid GPIO (errorpointer) > gpiod_set_value_cansleep: invalid GPIO (errorpointer) > gpiod_set_value_cansleep: invalid GPIO (errorpointer) > > Detect and propagate errors to fix this. > > Fixes: f3186dd876697e69 ("spi: Optionally use GPIO descriptors for CS GPIOs") > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Good catch! Sorry for my bugs... Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours, Linus Walleij
| |