PM / Hibernate: Replace unintuitive 'if' condition in kernel/power/user.c with 'else'
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Fri, 2 Dec 2011 23:20:30 +0000 (00:20 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Tue, 6 Dec 2011 21:13:44 +0000 (22:13 +0100)
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>
kernel/power/user.c

index c202e2e1a2d5dbd56bf4d2f33669abf99141d7da..06ea33df856092ed0cc9f7dba070697a73b00ee0 100644 (file)
@@ -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;