diff options
author | Daeseok Youn <daeseok.youn@gmail.com> | 2014-07-09 16:29:33 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-09 12:02:16 -0700 |
commit | 039879e8c11a2fa62def79df4bcb39b701d6aefe (patch) | |
tree | d5cdcdb4830850cde7f3c54d15f7186b75a9a9bd /drivers/staging/dgap | |
parent | 32af5ae73cd154cdab08fdf925ae1bd7c7af1b39 (diff) |
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>
Diffstat (limited to 'drivers/staging/dgap')
-rw-r--r-- | drivers/staging/dgap/dgap.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index e8d3c99880f5..522a4a86e27c 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -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; } |