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:
parent
4cd3096dfd
commit
fc8612b1cb
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user