]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: dgap: use kzalloc instead of kmalloc/memset
authorDaeseok Youn <daeseok.youn@gmail.com>
Wed, 9 Jul 2014 07:29:33 +0000 (16:29 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 19:02:16 +0000 (12:02 -0700)
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c

index e8d3c99880f5a1ed0211a7a8824f417e8b3fd200..522a4a86e27c82aed47c7c6fc87dea29d0936714 100644 (file)
@@ -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;
 }