Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0edf4bc authored by Navya Sri Nizamkari's avatar Navya Sri Nizamkari Committed by Greg Kroah-Hartman
Browse files

staging: wlan-ng: Use kzalloc instead of kmalloc.



This patch uses kzalloc instead of kmalloc function.
A coccinelle script was used to make this change.

Signed-off-by: default avatarNavya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a774fe09
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -619,11 +619,10 @@ static hfa384x_usbctlx_t *usbctlx_alloc(void)
{
{
	hfa384x_usbctlx_t *ctlx;
	hfa384x_usbctlx_t *ctlx;


	ctlx = kmalloc(sizeof(*ctlx), in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
	ctlx = kzalloc(sizeof(*ctlx),
	if (ctlx != NULL) {
		       in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
		memset(ctlx, 0, sizeof(*ctlx));
	if (ctlx != NULL)
		init_completion(&ctlx->done);
		init_completion(&ctlx->done);
	}


	return ctlx;
	return ctlx;
}
}