From fc8612b1cbd55d805b5df3c867d21699873a95b3 Mon Sep 17 00:00:00 2001 From: Aishwarya Pant Date: Sun, 12 Mar 2017 21:08:43 +0530 Subject: [PATCH] staging: bcm2835-audio: Replace kmalloc with kzalloc Replace kmalloc and memset with kzalloc. Signed-off-by: Aishwarya Pant Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c index d8a8e91d824e..66a35eefa6f9 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c @@ -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 */ -- 2.20.1