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:
bcac2b1
)
proc: vmcore - use kzalloc in get_new_element()
author
Cyrill Gorcunov
<
[email protected]
>
Wed, 17 Jun 2009 23:26:00 +0000
(16:26 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 18 Jun 2009 20:03:41 +0000
(13:03 -0700)
Instead of kmalloc+memset better use straight kzalloc
Signed-off-by: Cyrill Gorcunov <
[email protected]
>
Reviewed-by: WANG Cong <
[email protected]
>
Acked-by: Vivek Goyal <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/proc/vmcore.c
patch
|
blob
|
history
diff --git
a/fs/proc/vmcore.c
b/fs/proc/vmcore.c
index 5edcc3f92ba746496da35c23964c19e5518810b4..0872afa58d3987682bbdb4afdfdf5e24a95669f7 100644
(file)
--- a/
fs/proc/vmcore.c
+++ b/
fs/proc/vmcore.c
@@
-166,12
+166,7
@@
static const struct file_operations proc_vmcore_operations = {
static struct vmcore* __init get_new_element(void)
{
- struct vmcore *p;
-
- p = kmalloc(sizeof(*p), GFP_KERNEL);
- if (p)
- memset(p, 0, sizeof(*p));
- return p;
+ return kzalloc(sizeof(struct vmcore), GFP_KERNEL);
}
static u64 __init get_vmcore_size_elf64(char *elfptr)