Skip to content

Commit 625fe4f

Browse files
James Morserafaeljw
authored andcommitted
ARM: cpuidle: Pass on arm_cpuidle_suspend()'s return value
arm_cpuidle_suspend() may return -EOPNOTSUPP, or any value returned by the cpu_ops/cpuidle_ops suspend call. arm_enter_idle_state() doesn't update 'ret' with this value, meaning we always signal success to cpuidle_enter_state(), causing it to update the usage counters as if we succeeded. Fixes: 191de17 ("ARM64: cpuidle: Replace cpu_suspend by the common ARM/ARM64 function") Signed-off-by: James Morse <james.morse@arm.com> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: 4.1+ <stable@vger.kernel.org> # 4.1+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 02da2d7 commit 625fe4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cpuidle/cpuidle-arm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static int arm_enter_idle_state(struct cpuidle_device *dev,
5050
* call the CPU ops suspend protocol with idle index as a
5151
* parameter.
5252
*/
53-
arm_cpuidle_suspend(idx);
53+
ret = arm_cpuidle_suspend(idx);
5454

5555
cpu_pm_exit();
5656
}

0 commit comments

Comments
 (0)