From: Haavard Skinnemoen Date: Tue, 5 May 2009 00:22:43 +0000 (-0700) Subject: USB: atmel_usb_udc: Use kzalloc() to allocate ep structures X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fe92c9e481a147a9e1e14f55870f32903b967777;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git USB: atmel_usb_udc: Use kzalloc() to allocate ep structures This ensures that all fields are properly initialized. Signed-off-by: Haavard Skinnemoen Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index 5644897c1c5d..05c913cc3658 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c @@ -1941,7 +1941,7 @@ static int __init usba_udc_probe(struct platform_device *pdev) usba_writel(udc, CTRL, USBA_DISABLE_MASK); clk_disable(pclk); - usba_ep = kmalloc(sizeof(struct usba_ep) * pdata->num_ep, + usba_ep = kzalloc(sizeof(struct usba_ep) * pdata->num_ep, GFP_KERNEL); if (!usba_ep) goto err_alloc_ep;