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-Tag: v2.6.30-rc8~18^2~4 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=fe92c9e481a147a9e1e14f55870f32903b967777;p=~shefty%2Frdma-dev.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 5644897c1c5..05c913cc365 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;