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:
Родитель
32af5ae73c
Коммит
039879e8c1
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче