USB: atmel_usb_udc: Use kzalloc() to allocate ep structures
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Tue, 5 May 2009 00:22:43 +0000 (17:22 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 28 May 2009 20:54:41 +0000 (13:54 -0700)
This ensures that all fields are properly initialized.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/atmel_usba_udc.c

index 5644897c1c5dd63673aa5a028907856ec9891cb8..05c913cc3658f0389ab0ace117a8f50c8a166785 100644 (file)
@@ -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;