]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Freezer: remove redundant check in try_to_freeze_tasks
authorRafael J. Wysocki <rjw@sisk.pl>
Thu, 19 Jul 2007 08:47:35 +0000 (01:47 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 19 Jul 2007 17:04:42 +0000 (10:04 -0700)
We don't need to check if todo is positive before calling time_after() in
try_to_freeze_tasks(), because if todo is zero at this point, the loop will be
broken anyway due to the while () condition being false.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/power/process.c

index 00cdbe5f518ff8bf755f33bc83f5755adc9d19d1..3434940a3df175679e4391f94755f09431c864c1 100644 (file)
@@ -149,7 +149,7 @@ static int try_to_freeze_tasks(int freeze_user_space)
                } while_each_thread(g, p);
                read_unlock(&tasklist_lock);
                yield();                        /* Yield is okay here */
-               if (todo && time_after(jiffies, end_time))
+               if (time_after(jiffies, end_time))
                        break;
        } while (todo);