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>
This commit is contained in:
Родитель
f42706c904
Коммит
fe92c9e481
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче