Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe92c9e4 authored by Haavard Skinnemoen's avatar Haavard Skinnemoen Committed by Greg Kroah-Hartman
Browse files

USB: atmel_usb_udc: Use kzalloc() to allocate ep structures



This ensures that all fields are properly initialized.

Signed-off-by: default avatarHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f42706c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;