usb: gadget: dummy_hcd: fixup error probe path
authorSebastian Andrzej Siewior <sebastian@breakpoint.cc>
Sun, 19 Aug 2012 19:54:58 +0000 (21:54 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 10 Oct 2012 02:31:14 +0000 (03:31 +0100)
commit7961453cfff7d645f394cc09fb82c1561be1b4c1
tree9fa14a6d4409ea95d607dbc2a9ebc1fdc4c15a54
parent5e47beb778ad1c5fa901a61700f3ac1b4ee8a579
usb: gadget: dummy_hcd: fixup error probe path

commit 1b68a4ca2d038addb7314211d122fb6d7002b38b upstream.

If USB2 host controller probes fine but USB3 does not then we don't
remove the USB controller properly and lock up the system while the HUB
code will try to enumerate the USB2 controller and access memory which
is no longer available in case the dummy_hcd was compiled as a module.

This is a problem since 448b6eb1 ("USB: Make sure to fetch the BOS desc
for roothubs.) if used in USB3 mode because dummy does not provide this
descriptor and explodes later.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/gadget/dummy_hcd.c