usb/dummy_hcd: don't probe for udc if hcd failed
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 15 Apr 2011 18:37:06 +0000 (20:37 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 30 Apr 2011 00:24:36 +0000 (17:24 -0700)
commit865835fa441fcabc65251f14280df3055fe82d0f
tree0460ece61ef14804a0eb67a04425023ef3e2c54c
parent1d15ee4cd7c9ddacfb4b517131b257d8c0d74d42
usb/dummy_hcd: don't probe for udc if hcd failed

the_controller is allocated in dummy_hcd_probe() and is NULL if the
allocation failed. The probe function of the udc driver is dereferencing
this pointer and fault.
Alan Stern suggested to abort the dummy_hcd driver probing so the module
is not loaded. The is abort-on-error has been also added to the udc
driver.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/dummy_hcd.c