Skip to content

Commit

Permalink
PM / Hibernate: Replace unintuitive 'if' condition in kernel/power/us…
Browse files Browse the repository at this point in the history
…er.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 <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
Srivatsa S. Bhat authored and rjwysocki committed Dec 6, 2011
1 parent 2e8e89e commit e5b1674
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/power/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e5b1674

Please sign in to comment.