staging: bcm2835-audio: Replace kmalloc with kzalloc
authorAishwarya Pant <aishpant@gmail.com>
Sun, 12 Mar 2017 15:38:43 +0000 (21:08 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Mar 2017 23:57:53 +0000 (07:57 +0800)
Replace kmalloc and memset with kzalloc.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c

index d8a8e91d824ec7aeb98e1cd72cc57896185ffe35..66a35eefa6f93742f9ebf9158f9ede1219067f8b 100644 (file)
@@ -290,11 +290,10 @@ vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance,
                return NULL;
        }
        /* Allocate memory for this instance */
-       instance = kmalloc(sizeof(*instance), GFP_KERNEL);
+       instance = kzalloc(sizeof(*instance), GFP_KERNEL);
        if (!instance)
                return NULL;
 
-       memset(instance, 0, sizeof(*instance));
        instance->num_connections = num_connections;
 
        /* Create a lock for exclusive, serialized VCHI connection access */