aboutsummaryrefslogtreecommitdiff
path: root/kernel/power
diff options
context:
space:
mode:
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>2011-12-03 00:20:30 +0100
committerRafael J. Wysocki <rjw@sisk.pl>2011-12-06 22:13:44 +0100
commite5b16746f0f2d6883c226af52d90904ce0f7eee8 (patch)
tree89aa15350ccdef11fec16be252850627167d7167 /kernel/power
parent2e8e89e392c62636ee33532358607baef2863173 (diff)
PM / Hibernate: Replace unintuitive 'if' condition in kernel/power/user.c with 'else'
In the snapshot_ioctl() function, under SNAPSHOT_FREEZE, the code below freeze_processes() is a bit unintuitive. Improve it by replacing the second 'if' condition with an 'else' clause. Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c
index c202e2e1a2d..06ea33df856 100644
--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -259,7 +259,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
error = freeze_processes();
if (error)
usermodehelper_enable();
- if (!error)
+ else
data->frozen = 1;
break;