Commit e5b16746 authored by Srivatsa S. Bhat's avatar Srivatsa S. Bhat Committed by Rafael J. Wysocki

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: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent 2e8e89e3
...@@ -259,7 +259,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd, ...@@ -259,7 +259,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
error = freeze_processes(); error = freeze_processes();
if (error) if (error)
usermodehelper_enable(); usermodehelper_enable();
if (!error) else
data->frozen = 1; data->frozen = 1;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment