summaryrefslogtreecommitdiffstats
path: root/kernel/power/user.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/user.c')
-rw-r--r--kernel/power/user.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c
index 7bee91f9af5..33c4329205a 100644
--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -251,10 +251,8 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
error = hibernation_snapshot(data->platform_support);
if (!error) {
error = put_user(in_suspend, (int __user *)arg);
- if (!error && !freezer_test_done)
- data->ready = 1;
- if (freezer_test_done)
- freezer_test_done = false;
+ data->ready = !freezer_test_done && !error;
+ freezer_test_done = false;
}
break;