From: Arnd Bergmann <arnd@arndb.de>
To: Kevin Liu <keyuan.liu@gmail.com>
Cc: Chris Ball <cjb@laptop.org>,
"linux-kernel@vger.kernel.org List"
<linux-kernel@vger.kernel.org>,
Stephen Warren <swarren@wwwdotorg.org>,
linux-arm-kernel@lists.infradead.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Linus Walleij <linus.walleij@linaro.org>,
Axel Lin <axel.lin@ingics.com>, Jingoo Han <jg1.han@samsung.com>,
Felipe Balbi <balbi@ti.com>, Dmitry Torokhov <dtor@mail.ru>,
linux-mmc@vger.kernel.org
Subject: Re: FW: Regulator API ignored return values
Date: Tue, 12 Mar 2013 14:03:09 +0000 [thread overview]
Message-ID: <201303121403.09315.arnd@arndb.de> (raw)
In-Reply-To: <CADz5_g+KfxL43BKKsgZZ3Xg4sZWE4-ZaFpFhphKrfj9yK59-XA@mail.gmail.com>
On Tuesday 12 March 2013, Kevin Liu wrote:
> > - regulator_enable(host->vqmmc);
> > + ret = regulator_enable(host->vqmmc);
> > if (!regulator_is_supported_voltage(host->vqmmc, 1700000,
> > 1950000))
> > caps[1] &= ~(SDHCI_SUPPORT_SDR104 |
> > SDHCI_SUPPORT_SDR50 |
> > SDHCI_SUPPORT_DDR50);
> > + if (ret) {
> > + pr_warn("%s: Failed to enable vqmmc regulator: %d\n",
> > + mmc_hostname(mmc), ret);
>
> Need add regulator_put here since regulator_get has succeed?
Hmm, we still don't actually bail out if the error is encountered, so
the reference count is balanced with the current patch, but I maybe
a failed regulator_enable() should actually be a fatal error?
If we do that, using devm_regulator_get() would be a nice way to
track the reference counts.
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: FW: Regulator API ignored return values
Date: Tue, 12 Mar 2013 14:03:09 +0000 [thread overview]
Message-ID: <201303121403.09315.arnd@arndb.de> (raw)
In-Reply-To: <CADz5_g+KfxL43BKKsgZZ3Xg4sZWE4-ZaFpFhphKrfj9yK59-XA@mail.gmail.com>
On Tuesday 12 March 2013, Kevin Liu wrote:
> > - regulator_enable(host->vqmmc);
> > + ret = regulator_enable(host->vqmmc);
> > if (!regulator_is_supported_voltage(host->vqmmc, 1700000,
> > 1950000))
> > caps[1] &= ~(SDHCI_SUPPORT_SDR104 |
> > SDHCI_SUPPORT_SDR50 |
> > SDHCI_SUPPORT_DDR50);
> > + if (ret) {
> > + pr_warn("%s: Failed to enable vqmmc regulator: %d\n",
> > + mmc_hostname(mmc), ret);
>
> Need add regulator_put here since regulator_get has succeed?
Hmm, we still don't actually bail out if the error is encountered, so
the reference count is balanced with the current patch, but I maybe
a failed regulator_enable() should actually be a fatal error?
If we do that, using devm_regulator_get() would be a nice way to
track the reference counts.
Arnd
next prev parent reply other threads:[~2013-03-12 14:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <25B60CDC2F704E4E9D88FFD52780CB4C0BDEB0547F@SC-VEXCH1.marvell.com>
2013-03-12 4:15 ` FW: Regulator API ignored return values Kevin Liu
2013-03-12 4:15 ` Kevin Liu
2013-03-12 14:03 ` Arnd Bergmann [this message]
2013-03-12 14:03 ` Arnd Bergmann
2013-03-12 14:30 ` Chris Ball
2013-03-12 14:30 ` Chris Ball
2013-03-12 14:30 ` Chris Ball
2013-03-22 16:41 ` Chris Ball
2013-03-22 16:41 ` Chris Ball
2013-03-22 16:41 ` Chris Ball
2013-03-22 17:06 ` Arnd Bergmann
2013-03-22 17:06 ` Arnd Bergmann
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=201303121403.09315.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=axel.lin@ingics.com \
--cc=balbi@ti.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cjb@laptop.org \
--cc=dtor@mail.ru \
--cc=jg1.han@samsung.com \
--cc=keyuan.liu@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=swarren@wwwdotorg.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.