ehci: msm: Add missing platdata
authorRamon Fried <ramon.fried@gmail.com>
Fri, 21 Sep 2018 10:35:44 +0000 (13:35 +0300)
committerTom Rini <trini@konsulko.com>
Sun, 30 Sep 2018 17:00:35 +0000 (13:00 -0400)
platdata_auto_alloc_size was not initialized in structure.
Caused null pointer dereference when configuring device as
gadget.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
drivers/usb/host/ehci-msm.c

index db98262..e7fb76d 100644 (file)
@@ -167,5 +167,6 @@ U_BOOT_DRIVER(usb_ehci) = {
        .remove = ehci_usb_remove,
        .ops    = &ehci_usb_ops,
        .priv_auto_alloc_size = sizeof(struct msm_ehci_priv),
+       .platdata_auto_alloc_size = sizeof(struct usb_platdata),
        .flags  = DM_FLAG_ALLOC_PRIV_DMA,
 };