diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2010-05-26 17:43:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 12:12:48 -0400 |
commit | 80b5184cc537718122e036afe7e62d202b70d077 (patch) | |
tree | d4e2b400f0e951156d64d546fd563fa5a8ab02d3 /kernel/timer.c | |
parent | ad84bb5b98bf81deae97e3bcd814675d6b4e6f72 (diff) |
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.c | 7 |
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, | |||
1680 | unsigned long action, void *hcpu) | 1680 | unsigned long action, void *hcpu) |
1681 | { | 1681 | { |
1682 | long cpu = (long)hcpu; | 1682 | long cpu = (long)hcpu; |
1683 | int err; | ||
1684 | |||
1683 | switch(action) { | 1685 | switch(action) { |
1684 | case CPU_UP_PREPARE: | 1686 | case CPU_UP_PREPARE: |
1685 | case CPU_UP_PREPARE_FROZEN: | 1687 | case CPU_UP_PREPARE_FROZEN: |
1686 | if (init_timers_cpu(cpu) < 0) | 1688 | err = init_timers_cpu(cpu); |
1687 | return NOTIFY_BAD; | 1689 | if (err < 0) |
1690 | return notifier_from_errno(err); | ||
1688 | break; | 1691 | break; |
1689 | #ifdef CONFIG_HOTPLUG_CPU | 1692 | #ifdef CONFIG_HOTPLUG_CPU |
1690 | case CPU_DEAD: | 1693 | case CPU_DEAD: |