PM, kernel/power/user.c: Replace unintuitive 'if' condition with 'else'
Subsystems (2)
PATCH 1/1 PM, kernel/power/user.c: Replace unintuitive 'if' condition 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]>
---
kernel/power/user.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/power/user.c +1 -1
@@ -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 ;
Rafael J. Wysocki
AppliedQuoted 5 lines · Srivatsa S. Bhat
In the
snapshot_ioctl()function, underSNAPSHOT_FREEZE, the code belowfreeze_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]>
Applied to linux-pm/linux-next.
Thanks,
Rafael
Quoted 25 lines
---
kernel/power/user.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)kernel/power/user.c +1
-2@@ -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 ; --To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html