From: Jeff Layton Date: Sun, 25 Dec 2011 23:29:55 +0000 (+0100) Subject: PM / Freezer: fix return value of freezable_schedule_timeout_killable() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b3b73ec0d7fe5bf8f950232aa58dfa0416a62372;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git PM / Freezer: fix return value of freezable_schedule_timeout_killable() ...it should return the return code from schedule_timeout_killable(), not the one from freezer_count(). All of the current callers ignore the return code so the bug is harmless but it's worth fixing. Signed-off-by: Jeff Layton Signed-off-by: Rafael J. Wysocki --- diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 7bcfe73d999b..0ab54e16a91f 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h @@ -116,9 +116,11 @@ static inline int freezer_should_skip(struct task_struct *p) /* Like schedule_timeout_killable(), but should not block the freezer. */ #define freezable_schedule_timeout_killable(timeout) \ ({ \ + long __retval; \ freezer_do_not_count(); \ - schedule_timeout_killable(timeout); \ + __retval = schedule_timeout_killable(timeout); \ freezer_count(); \ + __retval; \ }) /*