aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/dgap
diff options
context:
space:
mode:
authorDaeseok Youn <daeseok.youn@gmail.com>2014-07-09 16:29:33 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-09 12:02:16 -0700
commit039879e8c11a2fa62def79df4bcb39b701d6aefe (patch)
treed5cdcdb4830850cde7f3c54d15f7186b75a9a9bd /drivers/staging/dgap
parent32af5ae73cd154cdab08fdf925ae1bd7c7af1b39 (diff)
downloadlinux-stericsson-039879e8c11a2fa62def79df4bcb39b701d6aefe.tar.gz
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.c6
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;
}