Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318812
b: refs/heads/master
c: 1b0a0e9
h: refs/heads/master
v: v3
  • Loading branch information
Srivatsa S. Bhat authored and Len Brown committed Jun 1, 2012
1 parent b4e1e5d commit 46318de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0aeb9cac6f8a6fc68acfb07d30b62ad6106a6384
refs/heads/master: 1b0a0e9a15b976d91f3b5ae619c6a8964c2818eb
8 changes: 6 additions & 2 deletions trunk/drivers/cpuidle/cpuidle.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ int cpuidle_enable_device(struct cpuidle_device *dev)
int ret, i;
struct cpuidle_driver *drv = cpuidle_get_driver();

if (!dev)
return -EINVAL;

if (dev->enabled)
return 0;
if (!drv || !cpuidle_curr_governor)
Expand Down Expand Up @@ -369,8 +372,6 @@ 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)
return -EINVAL;
if (!try_module_get(cpuidle_driver->owner))
return -EINVAL;

Expand All @@ -395,6 +396,9 @@ int cpuidle_register_device(struct cpuidle_device *dev)
{
int ret;

if (!dev)
return -EINVAL;

mutex_lock(&cpuidle_lock);

if ((ret = __cpuidle_register_device(dev))) {
Expand Down

0 comments on commit 46318de

Please sign in to comment.