linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Mark Brown <broonie@kernel.org>,
	linux-spi <linux-spi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] spi: Add missing error handling for CS GPIOs
Date: Mon, 8 Apr 2019 13:12:44 +0200	[thread overview]
Message-ID: <CACRpkdaY=0hhNL0c+Gr7JnE-9UFVAqXUXGUWA3+KYm2sAwc=MA@mail.gmail.com> (raw)
In-Reply-To: <20190403144656.8257-1-geert+renesas@glider.be>

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

      parent reply	other threads:[~2019-04-08 11:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 14:46 [PATCH] spi: Add missing error handling for CS GPIOs Geert Uytterhoeven
2019-04-04  6:04 ` Applied "spi: Add missing error handling for CS GPIOs" to the spi tree Mark Brown
2019-04-08 11:12 ` Linus Walleij [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACRpkdaY=0hhNL0c+Gr7JnE-9UFVAqXUXGUWA3+KYm2sAwc=MA@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=broonie@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).