summaryrefslogtreecommitdiffstats
path: root/kernel/timer.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2010-05-26 14:43:32 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-27 09:12:48 -0700
commit80b5184cc537718122e036afe7e62d202b70d077 (patch)
treed4e2b400f0e951156d64d546fd563fa5a8ab02d3 /kernel/timer.c
parentad84bb5b98bf81deae97e3bcd814675d6b4e6f72 (diff)
downloadlinux-80b5184cc537718122e036afe7e62d202b70d077.tar.gz
linux-80b5184cc537718122e036afe7e62d202b70d077.tar.bz2
linux-80b5184cc537718122e036afe7e62d202b70d077.zip
kernel/: convert cpu notifier to return encapsulate errno value
By the previous modification, the cpu notifier can return encapsulate errno value. This converts the cpu notifiers for kernel/*.c Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/timer.c')
-rw-r--r--kernel/timer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index be394af5bc22..e3b8c697bde4 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1680,11 +1680,14 @@ static int __cpuinit timer_cpu_notify(struct notifier_block *self,
unsigned long action, void *hcpu)
{
long cpu = (long)hcpu;
+ int err;
+
switch(action) {
case CPU_UP_PREPARE:
case CPU_UP_PREPARE_FROZEN:
- if (init_timers_cpu(cpu) < 0)
- return NOTIFY_BAD;
+ err = init_timers_cpu(cpu);
+ if (err < 0)
+ return notifier_from_errno(err);
break;
#ifdef CONFIG_HOTPLUG_CPU
case CPU_DEAD: