From: Srivatsa S. Bhat Date: Fri, 2 Dec 2011 23:20:30 +0000 (+0100) Subject: PM / Hibernate: Replace unintuitive 'if' condition in kernel/power/user.c with 'else' X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e5b16746f0f2d6883c226af52d90904ce0f7eee8;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Rafael J. Wysocki --- diff --git a/kernel/power/user.c b/kernel/power/user.c index c202e2e1a2d5..06ea33df8560 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;