ARM: pm: force non-zero return value from __cpu_suspend when aborting
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 27 Aug 2011 10:17:36 +0000 (11:17 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 20 Sep 2011 22:33:28 +0000 (23:33 +0100)
Ensure that the return value from __cpu_suspend is non-zero when
aborting.  Zero indicates a successful suspend occurred.

Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/sleep.S

index dc902f2c68457b0f3277b8112a7a1e867106cde8..46a9f460db830b78f34339bb2be7cc98385de835 100644 (file)
@@ -61,6 +61,8 @@ ENDPROC(__cpu_suspend)
 
 cpu_suspend_abort:
        ldmia   sp!, {r1 - r3}          @ pop v:p, virt SP, phys resume fn
+       teq     r0, #0
+       moveq   r0, #1                  @ force non-zero value
        mov     sp, r2
        ldmfd   sp!, {r4 - r11, pc}
 ENDPROC(cpu_suspend_abort)