Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298869
b: refs/heads/master
c: ee01e66
h: refs/heads/master
i:
  298867: 3414b9e
v: v3
  • Loading branch information
Toshi Kani authored and Len Brown committed Apr 6, 2012
1 parent 7024935 commit ac55958
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: 54f70077768e9aba37d9c5030b43497b6d5084fb
refs/heads/master: ee01e663373343c63e0e3d364d09f6155378dbcc
5 changes: 4 additions & 1 deletion trunk/drivers/cpuidle/cpuidle.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static cpuidle_enter_t cpuidle_enter_ops;
/**
* cpuidle_play_dead - cpu off-lining
*
* Only returns in case of an error
* Returns in case of an error or no driver
*/
int cpuidle_play_dead(void)
{
Expand All @@ -83,6 +83,9 @@ int cpuidle_play_dead(void)
int i, dead_state = -1;
int power_usage = -1;

if (!drv)
return -ENODEV;

/* Find lowest-power state that supports long-term idle */
for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++) {
struct cpuidle_state *s = &drv->states[i];
Expand Down

0 comments on commit ac55958

Please sign in to comment.