|
@@ -74,7 +74,7 @@ static cpuidle_enter_t cpuidle_enter_ops;
|
|
/**
|
|
/**
|
|
* cpuidle_play_dead - cpu off-lining
|
|
* 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)
|
|
int cpuidle_play_dead(void)
|
|
{
|
|
{
|
|
@@ -83,6 +83,9 @@ int cpuidle_play_dead(void)
|
|
int i, dead_state = -1;
|
|
int i, dead_state = -1;
|
|
int power_usage = -1;
|
|
int power_usage = -1;
|
|
|
|
|
|
|
|
+ if (!drv)
|
|
|
|
+ return -ENODEV;
|
|
|
|
+
|
|
/* Find lowest-power state that supports long-term idle */
|
|
/* Find lowest-power state that supports long-term idle */
|
|
for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++) {
|
|
for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++) {
|
|
struct cpuidle_state *s = &drv->states[i];
|
|
struct cpuidle_state *s = &drv->states[i];
|