Messages in this thread Patch in this message |  | | From | jhbird.choi@samsung ... | | Subject | [PATCH] cpuidle: fix an incorrect NULL pointer check | | Date | Sat, 14 Jan 2012 07:42:47 +0900 |
| |
From: Jonghwan Choi <jhbird.choi@samsung.com>
"cpu_dev" should be checked instead of "dev".
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> --- drivers/cpuidle/cpuidle.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
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; -- 1.7.1
|  |