staging: dgap: use kzalloc instead of kmalloc/memset

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Daeseok Youn 2014-07-09 16:29:33 +09:00 committed by Greg Kroah-Hartman
parent 32af5ae73c
commit 039879e8c1

View file

@ -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;
}