diff mbox series

[U-Boot,v2,02/14] ehci: msm: Add missing platdata

Message ID 20180921103555.16240-3-ramon.fried@gmail.com
State Accepted
Delegated to: Tom Rini
Headers show
Series Introduce fastboot support for dragonboard410c | expand

Commit Message

Ramon Fried Sept. 21, 2018, 10:35 a.m. UTC
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>
---

Changes in v2: None

 drivers/usb/host/ehci-msm.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Tom Rini Sept. 30, 2018, 7:25 p.m. UTC | #1
On Fri, Sep 21, 2018 at 01:35:44PM +0300, Ramon Fried wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index db982624dc..e7fb76d6da 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -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,
 };