* [patch] cpuidle: checking the wrong variable in __cpuidle_register_device()
@ 2012-01-09 10:54 Dan Carpenter
2012-01-09 13:00 ` Srivatsa S. Bhat
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-01-09 10:54 UTC (permalink / raw)
To: Len Brown, Kay Sievers
Cc: Kevin Hilman, Trinabh Gupta, Arjan van de Ven, Deepthi Dharwar,
linux-kernel, kernel-janitors
We updated this in 8a25a2fd12 "cpu: convert 'cpu' and 'machinecheck'
sysdev_class to a regular subsystem" but it should be checking "cpu_dev"
here not "dev". The "dev" variable was dereferenced already.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 59f4261..7771810 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -294,7 +294,7 @@ static int __cpuidle_register_device(struct cpuidle_device *dev)
struct device *cpu_dev = get_cpu_device((unsigned long)dev->cpu);
struct cpuidle_driver *cpuidle_driver = cpuidle_get_driver();
- if (!dev)
+ if (!cpu_dev)
return -EINVAL;
if (!try_module_get(cpuidle_driver->owner))
return -EINVAL;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] cpuidle: checking the wrong variable in __cpuidle_register_device()
2012-01-09 10:54 [patch] cpuidle: checking the wrong variable in __cpuidle_register_device() Dan Carpenter
@ 2012-01-09 13:00 ` Srivatsa S. Bhat
0 siblings, 0 replies; 2+ messages in thread
From: Srivatsa S. Bhat @ 2012-01-09 13:00 UTC (permalink / raw)
To: Dan Carpenter
Cc: Len Brown, Kay Sievers, Kevin Hilman, Trinabh Gupta,
Arjan van de Ven, Deepthi Dharwar, linux-kernel, kernel-janitors,
Linux PM mailing list, Greg Kroah-Hartman
On 01/09/2012 04:24 PM, Dan Carpenter wrote:
> We updated this in 8a25a2fd12 "cpu: convert 'cpu' and 'machinecheck'
> sysdev_class to a regular subsystem" but it should be checking "cpu_dev"
> here not "dev". The "dev" variable was dereferenced already.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> index 59f4261..7771810 100644
> --- a/drivers/cpuidle/cpuidle.c
> +++ b/drivers/cpuidle/cpuidle.c
> @@ -294,7 +294,7 @@ static int __cpuidle_register_device(struct cpuidle_device *dev)
> struct device *cpu_dev = get_cpu_device((unsigned long)dev->cpu);
> struct cpuidle_driver *cpuidle_driver = cpuidle_get_driver();
>
> - if (!dev)
> + if (!cpu_dev)
> return -EINVAL;
> if (!try_module_get(cpuidle_driver->owner))
> return -EINVAL;
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-09 13:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-09 10:54 [patch] cpuidle: checking the wrong variable in __cpuidle_register_device() Dan Carpenter
2012-01-09 13:00 ` Srivatsa S. Bhat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox