git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32af5ae
)
staging: dgap: use kzalloc instead of kmalloc/memset
author
Daeseok Youn
<daeseok.youn@gmail.com>
Wed, 9 Jul 2014 07:29:33 +0000
(16:29 +0900)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 19:02:16 +0000
(12:02 -0700)
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c
patch
|
blob
|
history
diff --git
a/drivers/staging/dgap/dgap.c
b/drivers/staging/dgap/dgap.c
index
e8d3c99
..
522a4a8
100644
(file)
--- a/
drivers/staging/dgap/dgap.c
+++ b/
drivers/staging/dgap/dgap.c
@@
-7322,11
+7322,9
@@
static struct cnode *dgap_newnode(int t)
{
struct cnode *n;
- n = kmalloc(sizeof(struct cnode), GFP_KERNEL);
- if (n) {
- memset((char *)n, 0, sizeof(struct cnode));
+ n = kzalloc(sizeof(struct cnode), GFP_KERNEL);
+ if (n)
n->type = t;
- }
return n;
}