summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2009-05-05 02:22:43 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-05-28 22:54:41 +0200
commitfe92c9e481a147a9e1e14f55870f32903b967777 (patch)
tree1d85176e24445aaabf61ef63bf47ef7905ea2fa8 /drivers
parentUSB: atmel-usba-udc : fix control out requests. (diff)
downloadlinux-fe92c9e481a147a9e1e14f55870f32903b967777.tar.xz
linux-fe92c9e481a147a9e1e14f55870f32903b967777.zip
USB: atmel_usb_udc: Use kzalloc() to allocate ep structures
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c2
1 files changed, 1 insertions, 1 deletions
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;