From: Daeseok Youn Date: Wed, 9 Jul 2014 07:29:33 +0000 (+0900) Subject: staging: dgap: use kzalloc instead of kmalloc/memset X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=039879e8c11a2fa62def79df4bcb39b701d6aefe;p=linux-beck.git staging: dgap: use kzalloc instead of kmalloc/memset Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index e8d3c99880f5..522a4a86e27c 100644 --- 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; }