In the case where need_resched() is set in between the cpu_idle() and
pm_idle() calls we were missing an else case for just re-enabling local
IRQs and bailing out. This was noticed by the irqs_disabled() warning,
even though IRQs were being re-enabled elsewhere.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
if (!need_resched()) {
local_irq_enable();
cpu_sleep();
- }
+ } else
+ local_irq_enable();
set_thread_flag(TIF_POLLING_NRFLAG);
} else