staging: bcm2835-audio: Replace kmalloc with kzalloc

Replace kmalloc and memset with kzalloc.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Aishwarya Pant 2017-03-12 21:08:43 +05:30 committed by Greg Kroah-Hartman
parent 4cd3096dfd
commit fc8612b1cb

View 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 */