All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Mark Brown <broonie@kernel.org>
Cc: Andrew Halaney <ahalaney@redhat.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	bmasney@redhat.com
Subject: Re: [PATCH] regulator: core: Clean up on enable failure
Date: Fri, 19 Aug 2022 16:03:24 -0700	[thread overview]
Message-ID: <CAD=FV=UWn8a9C3j0Ky9JWqo_2AvOE=ORVP94zHftGQLsxFdXyw@mail.gmail.com> (raw)
In-Reply-To: <YwATSglfJEgG6V73@sirena.org.uk>

Hi,

On Fri, Aug 19, 2022 at 3:48 PM Mark Brown <broonie@kernel.org> wrote:
>
> On Fri, Aug 19, 2022 at 02:43:36PM -0500, Andrew Halaney wrote:
>
> > -     if (regulator->uA_load && regulator->enable_count == 1)
> > -             return drms_uA_update(rdev);
> > +     if (regulator->uA_load && regulator->enable_count == 1) {
> > +             ret = drms_uA_update(rdev);
>
> I am vaugely surprised and a bit concerned that drms_uA_update() can
> fail...

In his original email Andrew implied that his system was misconfigured
when he was seeing this error. I presume this isn't common which is
why nobody had noticed this before now, but given that the function
drms_uA_update() does return an error code it seems like we should
handle it properly in the caller.

-Doug

  reply	other threads:[~2022-08-19 23:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19 19:43 [PATCH] regulator: core: Clean up on enable failure Andrew Halaney
2022-08-19 20:03 ` Doug Anderson
2022-08-19 20:46 ` Brian Masney
2022-08-19 22:48 ` Mark Brown
2022-08-19 23:03   ` Doug Anderson [this message]
2022-08-22 19:42     ` Andrew Halaney
2022-08-22 16:16 ` Mark Brown

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='CAD=FV=UWn8a9C3j0Ky9JWqo_2AvOE=ORVP94zHftGQLsxFdXyw@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=ahalaney@redhat.com \
    --cc=bmasney@redhat.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.