diff options
author | Dhruva Gole <d-gole@ti.com> | 2024-08-21 13:42:50 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-08-22 21:03:52 +0200 |
commit | 6baacf9391c03f91a7644b3f94634b7d4b2c5e34 (patch) | |
tree | 8fee2bab631559b36c02fdb8aaf405f4fcf81ed9 /drivers/cpuidle | |
parent | cpuidle: riscv-sbi: Simplify with scoped for each OF child loop (diff) | |
download | linux-6baacf9391c03f91a7644b3f94634b7d4b2c5e34.tar.xz linux-6baacf9391c03f91a7644b3f94634b7d4b2c5e34.zip |
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 <d-gole@ti.com>
Link: https://patch.msgid.link/20240821114250.1416421-1-d-gole@ti.com
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 02e40fd7d948..9e418aec1755 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -228,10 +228,7 @@ noinstr int cpuidle_enter_state(struct cpuidle_device *dev, if (broadcast && tick_broadcast_enter()) { index = find_deepest_state(drv, dev, target_state->exit_latency_ns, CPUIDLE_FLAG_TIMER_STOP, false); - if (index < 0) { - default_idle_call(); - return -EBUSY; - } + target_state = &drv->states[index]; broadcast = false; } |