From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] cpufreq: imx6q: Fix regulator/clock error handling
Date: Mon, 26 Oct 2015 08:38:35 +0100 [thread overview]
Message-ID: <20151026073835.GW14476@pengutronix.de> (raw)
In-Reply-To: <20151022133315.GE3897@ubuntu>
On Thu, Oct 22, 2015 at 07:03:15PM +0530, Viresh Kumar wrote:
> On 22-10-15, 10:47, Sascha Hauer wrote:
> > + arm_reg = regulator_get(cpu_dev, "arm");
> > + if (IS_ERR(arm_reg))
> > + return PTR_ERR(arm_reg);
> > +
> > + pu_reg = regulator_get_optional(cpu_dev, "pu");
>
> Yes, current code doesn't care about if this failed, but if that's the
> intention please add a comment for it now.
This is fixed right in the next patch.
>
> > + soc_reg = regulator_get(cpu_dev, "soc");
> > + if (IS_ERR(soc_reg))
> > + return PTR_ERR(soc_reg);
> > +
> > + return 0;
> > +}
> > +
> > +
> > +static void imx6q_cpufreq_put_resources(void)
> > +{
> > + if (!IS_ERR_OR_NULL(arm_reg))
> > + regulator_put(arm_reg);
> > + arm_reg = NULL;
>
> Can you please clarify (maybe again) why this is required to be set to
> NULL again?
Ok.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2015-10-26 7:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 8:47 cpufreq: i.MX6: -EPROBE_DEFER fixes Sascha Hauer
2015-10-22 8:47 ` [PATCH 1/4] cpufreq: imx6q: Fix goto wrong error label Sascha Hauer
2015-10-22 10:11 ` Lucas Stach
2015-10-22 8:47 ` [PATCH 2/4] cpufreq: imx6q: Fix wrong device in devm_kzalloc Sascha Hauer
2015-10-22 10:11 ` Lucas Stach
2015-10-22 13:29 ` Viresh Kumar
2015-10-22 8:47 ` [PATCH 3/4] cpufreq: imx6q: Fix regulator/clock error handling Sascha Hauer
2015-10-22 10:18 ` Lucas Stach
2015-10-22 13:33 ` Viresh Kumar
2015-10-26 7:38 ` Sascha Hauer [this message]
2015-10-22 8:47 ` [PATCH 4/4] cpufreq: imx6q: check regulator_get_optional return value Sascha Hauer
2015-10-22 10:23 ` Lucas Stach
2015-10-26 8:17 ` Sascha Hauer
2015-10-28 3:27 ` cpufreq: i.MX6: -EPROBE_DEFER fixes Rafael J. Wysocki
2015-10-28 7:59 ` Sascha Hauer
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=20151026073835.GW14476@pengutronix.de \
--to=s.hauer@pengutronix.de \
--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).