usb: ehci-hcd: Fix crash when no ops are provided to ehci_register()
Subsystems (2)
PATCH 1/1 usb: ehci-hcd: Fix crash when no ops are provided to ehci_register()
This commit fixes crash on BananaPi (and possibly others) casued by 3f9f8a5b83f8aec40c9f4ee496046a695e333c45.
Crash reason:
When no ops were passed to ehci_register(), USB host driver caused NULL pointer dereference.
---
drivers/usb/host/ehci-hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/ehci-hcd.c +2 -2
@@ -1615,8 +1615,8 @@ int ehci_register(struct udevice *dev, struct ehci_hccr *hccr,if (ret) goto err; -if (ops->init_after_reset) { - ret = ops->init_after_reset (ctrl); +if (ctrl->ops.init_after_reset) { + ret = ctrl->ops.init_after_reset (ctrl);if (ret) goto err; }
Signature · 1 line
2.5.0
PATCH 1/1 usb: ehci-hcd: Fix crash when no ops are provided to ehci_register()
Quoted 9 lines
This commit fixes crash on BananaPi (and possibly others) casued by
3f9f8a5b83f8aec40c9f4ee496046a695e333c45.Crash reason:
When no ops were passed toehci_register(), USB host driver caused NULL pointer dereference.Signed-off-by Mateusz Kulikowski <[email protected]>---
Confirmed working for Banana Pi, both on top of 3f9f8a5 and when applied to current master (563d8d9).
Regards, B. Nortmann
Marek Vasut
AppliedPATCH 1/1 usb: ehci-hcd: Fix crash when no ops are provided to ehci_register()
In reply to Mateusz KulikowskiQuoted 8 lines · Mateusz Kulikowski
This commit fixes crash on BananaPi (and possibly others) casued by
3f9f8a5b83f8aec40c9f4ee496046a695e333c45.Crash reason:
When no ops were passed toehci_register(), USB host driver caused NULL pointer dereference.Signed-off-by Mateusz Kulikowski <[email protected]>
Applied, thanks!
Best regards,
Marek Vasut