aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2009-09-22 19:45:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:42 -0400
commit90396f96b7da0e2305ffe0266d22b6f8221f28ba (patch)
tree8e609c30ef66e6f4753346043c1f31bf2855cedc /fs/proc
parent81ac3ad9061dd9cd490ee92f0c5316a14d77ce18 (diff)
kcore: more fixes for init
proc_kcore_init() doesn't check NULL case. fix it and remove unnecessary comments. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/kcore.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index c6a5ec731972..70733780fdd9 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -606,6 +606,10 @@ static int __init proc_kcore_init(void)
606{ 606{
607 proc_root_kcore = proc_create("kcore", S_IRUSR, NULL, 607 proc_root_kcore = proc_create("kcore", S_IRUSR, NULL,
608 &proc_kcore_operations); 608 &proc_kcore_operations);
609 if (!proc_root_kcore) {
610 printk(KERN_ERR "couldn't create /proc/kcore\n");
611 return 0; /* Always returns 0. */
612 }
609 /* Store text area if it's special */ 613 /* Store text area if it's special */
610 proc_kcore_text_init(); 614 proc_kcore_text_init();
611 /* Store vmalloc area */ 615 /* Store vmalloc area */
@@ -615,7 +619,6 @@ static int __init proc_kcore_init(void)
615 /* Store direct-map area from physical memory map */ 619 /* Store direct-map area from physical memory map */
616 kcore_update_ram(); 620 kcore_update_ram();
617 hotplug_memory_notifier(kcore_callback, 0); 621 hotplug_memory_notifier(kcore_callback, 0);
618 /* Other special area, area-for-module etc is arch specific. */
619 622
620 return 0; 623 return 0;
621} 624}