projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81ac3ad
)
kcore: more fixes for init
author
KAMEZAWA Hiroyuki
<
[email protected]
>
Tue, 22 Sep 2009 23:45:50 +0000
(16:45 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 23 Sep 2009 14:39:42 +0000
(07:39 -0700)
proc_kcore_init() doesn't check NULL case. fix it and remove unnecessary
comments.
Signed-off-by: KAMEZAWA Hiroyuki <
[email protected]
>
Acked-by: WANG Cong <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/proc/kcore.c
patch
|
blob
|
history
diff --git
a/fs/proc/kcore.c
b/fs/proc/kcore.c
index c6a5ec731972f555636e1fb551f2125b466d42f5..70733780fdd9ee612d63de0c5373294890ce0074 100644
(file)
--- a/
fs/proc/kcore.c
+++ b/
fs/proc/kcore.c
@@
-606,6
+606,10
@@
static int __init proc_kcore_init(void)
{
proc_root_kcore = proc_create("kcore", S_IRUSR, NULL,
&proc_kcore_operations);
+ if (!proc_root_kcore) {
+ printk(KERN_ERR "couldn't create /proc/kcore\n");
+ return 0; /* Always returns 0. */
+ }
/* Store text area if it's special */
proc_kcore_text_init();
/* Store vmalloc area */
@@
-615,7
+619,6
@@
static int __init proc_kcore_init(void)
/* Store direct-map area from physical memory map */
kcore_update_ram();
hotplug_memory_notifier(kcore_callback, 0);
- /* Other special area, area-for-module etc is arch specific. */
return 0;
}