Message ID | 4992010.31r3eYUQgx@rjwysocki.net |
---|---|
State | New |
Headers | show |
Series | [v1] cpuidle: Do not return from cpuidle_play_dead() on callback failures | expand |
Index: linux-pm/drivers/cpuidle/cpuidle.c =================================================================== --- linux-pm.orig/drivers/cpuidle/cpuidle.c +++ linux-pm/drivers/cpuidle/cpuidle.c @@ -70,9 +70,10 @@ int cpuidle_play_dead(void) return -ENODEV; /* Find lowest-power state that supports long-term idle */ - for (i = drv->state_count - 1; i >= 0; i--) - if (drv->states[i].enter_dead) - return drv->states[i].enter_dead(dev, i); + for (i = drv->state_count - 1; i >= 0; i--) { + if (drv->states[i].enter_dead && !drv->states[i].enter_dead(dev, i)) + return 0; + } return -ENODEV; }