From: ldewangan@nvidia.com (Laxman Dewangan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: dt: tegra: harmony: add regulators
Date: Tue, 28 Aug 2012 20:34:11 +0530 [thread overview]
Message-ID: <503CDDEB.1050201@nvidia.com> (raw)
In-Reply-To: <1346137800-7448-2-git-send-email-swarren@wwwdotorg.org>
On Tuesday 28 August 2012 12:40 PM, Stephen Warren wrote:
> #include "board.h"
> -#include "board-harmony.h"
>
> #ifdef CONFIG_TEGRA_PCI
>
> int __init harmony_pcie_init(void)
> {
> - struct regulator *regulator = NULL;
> + struct regulator *regulator_1v5, *regulator_pex;
> int err;
>
> - err = gpio_request(TEGRA_GPIO_EN_VDD_1V05_GPIO, "EN_VDD_1V05");
> - if (err)
> - return err;
> + regulator_1v5 = regulator_get(NULL, "vdd_1v5");
> + if (IS_ERR_OR_NULL(regulator_1v5)) {
> + err = PTR_ERR(regulator_1v5);
> + goto err_reg;
> + }
You need to return in case of err otherwise it will cause the crash in
regulator_disable() with NULL argument.
next prev parent reply other threads:[~2012-08-28 15:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 7:09 [PATCH 1/2] ARM: tegra: remove dead code Stephen Warren
2012-08-28 7:10 ` [PATCH 2/2] ARM: dt: tegra: harmony: add regulators Stephen Warren
2012-08-28 15:04 ` Laxman Dewangan [this message]
2012-08-28 23:06 ` Stephen Warren
2012-08-28 14:49 ` [PATCH 1/2] ARM: tegra: remove dead code Laxman Dewangan
2012-09-11 17:10 ` Stephen Warren
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=503CDDEB.1050201@nvidia.com \
--to=ldewangan@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.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).