mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-07 00:59:06 +00:00
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:
parent
32af5ae73c
commit
039879e8c1
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue