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/profile.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/profile.c')
-rw-r--r-- | kernel/profile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/profile.c b/kernel/profile.c index dfadc5b729f1..1e6a0d94ea63 100644 --- a/kernel/profile.c +++ b/kernel/profile.c | |||
@@ -372,7 +372,7 @@ static int __cpuinit profile_cpu_callback(struct notifier_block *info, | |||
372 | GFP_KERNEL | __GFP_ZERO, | 372 | GFP_KERNEL | __GFP_ZERO, |
373 | 0); | 373 | 0); |
374 | if (!page) | 374 | if (!page) |
375 | return NOTIFY_BAD; | 375 | return notifier_from_errno(-ENOMEM); |
376 | per_cpu(cpu_profile_hits, cpu)[1] = page_address(page); | 376 | per_cpu(cpu_profile_hits, cpu)[1] = page_address(page); |
377 | } | 377 | } |
378 | if (!per_cpu(cpu_profile_hits, cpu)[0]) { | 378 | if (!per_cpu(cpu_profile_hits, cpu)[0]) { |
@@ -388,7 +388,7 @@ out_free: | |||
388 | page = virt_to_page(per_cpu(cpu_profile_hits, cpu)[1]); | 388 | page = virt_to_page(per_cpu(cpu_profile_hits, cpu)[1]); |
389 | per_cpu(cpu_profile_hits, cpu)[1] = NULL; | 389 | per_cpu(cpu_profile_hits, cpu)[1] = NULL; |
390 | __free_page(page); | 390 | __free_page(page); |
391 | return NOTIFY_BAD; | 391 | return notifier_from_errno(-ENOMEM); |
392 | case CPU_ONLINE: | 392 | case CPU_ONLINE: |
393 | case CPU_ONLINE_FROZEN: | 393 | case CPU_ONLINE_FROZEN: |
394 | if (prof_cpu_mask != NULL) | 394 | if (prof_cpu_mask != NULL) |