All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Axel Lin <axel.lin@ingics.com>
Cc: Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regulator: ab3100: Fix regulator register error handling
Date: Mon, 29 Apr 2013 14:53:02 +0200	[thread overview]
Message-ID: <CACRpkdaPMfLu3Vi8BfETadvWJbEqf-S2XBAtbeHSr0PjgBWbaQ@mail.gmail.com> (raw)
In-Reply-To: <1366984629.31523.1.camel@phoenix>

On Fri, Apr 26, 2013 at 3:57 PM, Axel Lin <axel.lin@ingics.com> wrote:

> Ensure to unregister all regulators before return error in probe().
>
> The regulator register order depends on the regulator ID pass to
> ab3100_regulator_register() function. Thus we need to scan ab3100_regulator_desc
> and find the index of successfully registered regulators, or alternatively just
> call ab3100_regulators_remove() to unregister all registered regulators.
>
> Since current code uses a static ab3100_regulators table, explicitly set
> reg->rdev = NULL after regulator_unregister() call to ensure calling
> ab3100_regulators_remove() in the unwind path always work.
>
> Also move ab3100_regulators_remove() to avoid forward declaration.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Excellent patch Axel, thanks!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

      parent reply	other threads:[~2013-04-29 12:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26 13:57 [PATCH] regulator: ab3100: Fix regulator register error handling Axel Lin
2013-04-26 15:33 ` Mark Brown
2013-04-29 12:53 ` 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=CACRpkdaPMfLu3Vi8BfETadvWJbEqf-S2XBAtbeHSr0PjgBWbaQ@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=axel.lin@ingics.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.