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:
committed by
Greg Kroah-Hartman
parent
4cd3096dfd
commit
fc8612b1cb
@@ -290,11 +290,10 @@ vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/* Allocate memory for this instance */
|
/* Allocate memory for this instance */
|
||||||
instance = kmalloc(sizeof(*instance), GFP_KERNEL);
|
instance = kzalloc(sizeof(*instance), GFP_KERNEL);
|
||||||
if (!instance)
|
if (!instance)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
memset(instance, 0, sizeof(*instance));
|
|
||||||
instance->num_connections = num_connections;
|
instance->num_connections = num_connections;
|
||||||
|
|
||||||
/* Create a lock for exclusive, serialized VCHI connection access */
|
/* Create a lock for exclusive, serialized VCHI connection access */
|
||||||
|
|||||||
Reference in New Issue
Block a user