@@ -299,7 +299,10 @@ static int s3c_pm_enter(suspend_state_t state)
* we resume as it saves its own register state and restores it
* during the resume. */
- cpu_suspend(0, pm_cpu_sleep);
+ /* If entering sleep mode is failed, non-zero value is returned */
+
+ if (cpu_suspend(0, pm_cpu_sleep));
+ goto exit;
/* restore the system state */
@@ -323,6 +326,8 @@ static int s3c_pm_enter(suspend_state_t state)
/* ok, let's return from sleep */
S3C_PMDBG("S3C PM Resume (post-restore)\n");
+
+exit:
return 0;
}