Skip to content

Commit

Permalink
USB: atmel_usb_udc: Use kzalloc() to allocate ep structures
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Haavard Skinnemoen authored and Greg Kroah-Hartman committed May 28, 2009
1 parent f42706c commit fe92c9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/atmel_usba_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fe92c9e

Please sign in to comment.