PM / Suspend: Do not ignore error codes returned by suspend_enter()
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 22 Apr 2011 20:00:54 +0000 (22:00 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Tue, 17 May 2011 21:19:16 +0000 (23:19 +0200)
The current implementation of suspend-to-RAM returns 0 if there is an
error from suspend_enter(), because suspend_devices_and_enter() ignores
the return value from suspend_enter().  This patch addresses this issue
and properly keep the error return from suspend_enter() and let
suspend_devices_and_enter relay the error return.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
kernel/power/suspend.c

index 6275970b2189b3a970fd46b2794a23c87fde6240..fa9fabd12eff5b75b67cf78c5a225d6cbddf5a41 100644 (file)
@@ -226,7 +226,7 @@ int suspend_devices_and_enter(suspend_state_t state)
        if (suspend_test(TEST_DEVICES))
                goto Recover_platform;
 
-       suspend_enter(state);
+       error = suspend_enter(state);
 
  Resume_devices:
        suspend_test_start();