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;
|
struct cnode *n;
|
||||||
|
|
||||||
n = kmalloc(sizeof(struct cnode), GFP_KERNEL);
|
n = kzalloc(sizeof(struct cnode), GFP_KERNEL);
|
||||||
if (n) {
|
if (n)
|
||||||
memset((char *)n, 0, sizeof(struct cnode));
|
|
||||||
n->type = t;
|
n->type = t;
|
||||||
}
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче