From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM amba: optional PrimeCell core voltage switch
Date: Wed, 3 Nov 2010 15:05:50 +0000 [thread overview]
Message-ID: <20101103150550.GA11751@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTimPH7KHZrTtdGSSno7zz7tH56KCbYjoJibK=WwL@mail.gmail.com>
On Wed, Nov 03, 2010 at 07:41:44PM +0530, Sundar wrote:
> On Wed, Nov 3, 2010 at 3:39 PM, Linus Walleij
> <linus.walleij@stericsson.com> wrote:
> >
> > +static int amba_get_enable_vcore(struct amba_device *pcdev)
> > +{
> > + ? ? ? struct regulator *vcore = regulator_get(&pcdev->dev, "vcore");
> > + ? ? ? int ret;
> > +
> > + ? ? ? pcdev->vcore = vcore;
> > +
> > + ? ? ? if (IS_ERR(vcore)) {
> > + ? ? ? ? ? ? ? /* It is OK not to supply a vcore regulator */
> > + ? ? ? ? ? ? ? if (PTR_ERR(vcore) == -ENODEV)
> > + ? ? ? ? ? ? ? ? ? ? ? return 0;
> > + ? ? ? ? ? ? ? return PTR_ERR(vcore);
> > + ? ? ? }
>
> If i am right, you corrupt the pcdev->vcore even in an error case.
So? It's previous value is meaningless, and on failure the amba device
is not registered, and so this value won't be used.
prev parent reply other threads:[~2010-11-03 15:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-03 10:09 [PATCH] ARM amba: optional PrimeCell core voltage switch Linus Walleij
2010-11-03 14:11 ` Sundar
2010-11-03 14:14 ` Linus Walleij
2010-11-03 15:05 ` Russell King - ARM Linux [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=20101103150550.GA11751@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).