Skip to content

Commit fc8612b

Browse files
aishpantgregkh
authored andcommitted
staging: bcm2835-audio: Replace kmalloc with kzalloc
Replace kmalloc and memset with kzalloc. Signed-off-by: Aishwarya Pant <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4cd3096 commit fc8612b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,10 @@ vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance,
290290
return NULL;
291291
}
292292
/* Allocate memory for this instance */
293-
instance = kmalloc(sizeof(*instance), GFP_KERNEL);
293+
instance = kzalloc(sizeof(*instance), GFP_KERNEL);
294294
if (!instance)
295295
return NULL;
296296

297-
memset(instance, 0, sizeof(*instance));
298297
instance->num_connections = num_connections;
299298

300299
/* Create a lock for exclusive, serialized VCHI connection access */

0 commit comments

Comments
 (0)