From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Ashwin Chaugule <ashwin.chaugule@linaro.org>,
Len Brown <lenb@kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] ACPI / CPPC: set an error code on probe error path
Date: Wed, 30 Nov 2016 22:03:56 +0000 [thread overview]
Message-ID: <20161130215819.GN28558@mwanda> (raw)
In-Reply-To: <CAJZ5v0h06CXGzdAt=ZmB+pnWRumDGiic-eEpyLAojKVUVrJnnw@mail.gmail.com>
On Wed, Nov 30, 2016 at 10:53:55PM +0100, Rafael J. Wysocki wrote:
> On Wed, Nov 30, 2016 at 8:22 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > We should return -EINVAL if get_cpu_device() fails.
> >
> > Fixes: 158c998ea44b ("ACPI / CPPC: add sysfs support to compute delivered performance")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
> > index d0d0504..e0ea8f5 100644
> > --- a/drivers/acpi/cppc_acpi.c
> > +++ b/drivers/acpi/cppc_acpi.c
> > @@ -784,8 +784,10 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)
> >
> > /* Add per logical CPU nodes for reading its feedback counters. */
> > cpu_dev = get_cpu_device(pr->id);
> > - if (!cpu_dev)
> > + if (!cpu_dev) {
> > + ret = -EINVAL;
>
> ret is initialized here AFAICS.
>
> Do you that its value is not the right one?
I'm looking at linux-next. It's set to zero but we presumably want to
return an error code.
regards,
dan carpenter
next prev parent reply other threads:[~2016-11-30 22:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 19:22 [patch] ACPI / CPPC: set an error code on probe error path Dan Carpenter
2016-11-30 21:53 ` Rafael J. Wysocki
2016-11-30 21:55 ` Rafael J. Wysocki
2016-11-30 22:03 ` Dan Carpenter [this message]
2016-11-30 22:14 ` Rafael J. Wysocki
2016-12-01 14:14 ` Rafael J. Wysocki
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=20161130215819.GN28558@mwanda \
--to=dan.carpenter@oracle.com \
--cc=ashwin.chaugule@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
/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