Re: [patch] ACPI / CPPC: set an error code on probe error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, November 30, 2016 11:14:23 PM Rafael J. Wysocki wrote:
> On Wed, Nov 30, 2016 at 11:03 PM, Dan Carpenter
> <dan.carpenter@xxxxxxxxxx> wrote:
> > 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@xxxxxxxxxx> 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@xxxxxxxxxx>
> >> >
> >> > 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.
> 
> OK
> 
> It was slightly unclear what the bug was.

Applied now.

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux