Commit 039879e8 authored by Daeseok Youn's avatar Daeseok Youn Committed by Greg Kroah-Hartman

staging: dgap: use kzalloc instead of kmalloc/memset

Signed-off-by: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 32af5ae7
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment