From: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [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-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.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
[not found] ` <1346137800-7448-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-08-28 7:10 ` [PATCH 2/2] ARM: dt: tegra: harmony: add regulators Stephen Warren
[not found] ` <1346137800-7448-2-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-08-28 15:04 ` Laxman Dewangan [this message]
[not found] ` <503CDDEB.1050201-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
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-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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).