diff mbox

pm / core bugfix: report error return from suspend_enter

Message ID 1303456931-11657-1-git-send-email-myungjoo.ham@samsung.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

MyungJoo Ham April 22, 2011, 7:22 a.m. UTC
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>
---
 kernel/power/suspend.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Rafael Wysocki April 22, 2011, 10:13 p.m. UTC | #1
On Friday, April 22, 2011, MyungJoo Ham wrote:
> 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>

Applied to suspend-2.6/linux-next.

Thanks,
Rafael


> ---
>  kernel/power/suspend.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
> index 2814c32..08515b4 100644
> --- a/kernel/power/suspend.c
> +++ b/kernel/power/suspend.c
> @@ -224,7 +224,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();
>
diff mbox

Patch

diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 2814c32..08515b4 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -224,7 +224,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();