Skip to content

Commit 6baacf9

Browse files
DhruvaG2000rafaeljw
authored andcommitted
cpuidle: remove dead code from cpuidle_enter_state()
Checking for index < 0 is useless because the find_deepest_state() function never really returns a negative value. Since this hasn't been reported in over 9 years it's dead code, so remove it. Signed-off-by: Dhruva Gole <[email protected]> Link: https://patch.msgid.link/[email protected] [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent d5c667e commit 6baacf9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/cpuidle/cpuidle.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,7 @@ noinstr int cpuidle_enter_state(struct cpuidle_device *dev,
228228
if (broadcast && tick_broadcast_enter()) {
229229
index = find_deepest_state(drv, dev, target_state->exit_latency_ns,
230230
CPUIDLE_FLAG_TIMER_STOP, false);
231-
if (index < 0) {
232-
default_idle_call();
233-
return -EBUSY;
234-
}
231+
235232
target_state = &drv->states[index];
236233
broadcast = false;
237234
}

0 commit comments

Comments
 (0)