Skip to content

Commit 999a7bc

Browse files
author
Bruno George de Moraes
committed
Use kzalloc that is order of magnitude faster and saves .text compared with kcalloc
1 parent fe79947 commit 999a7bc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sound/arm/bcm2835-vchiq.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,10 @@ static AUDIO_INSTANCE_T *vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance,
261261
return NULL;
262262
}
263263
/* Allocate memory for this instance */
264-
instance = kmalloc(sizeof(*instance), GFP_KERNEL);
264+
instance = kzalloc(sizeof(*instance), GFP_KERNEL);
265265
if (!instance)
266266
return NULL;
267267

268-
memset(instance, 0, sizeof(*instance));
269268
instance->num_connections = num_connections;
270269

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

0 commit comments

Comments
 (0)