diff options
author | Gregory Herrero <gregory.herrero@intel.com> | 2015-09-29 12:08:21 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-10-01 12:40:24 -0500 |
commit | 86de48953653777fd6f918f5c0f2107bb873eae3 (patch) | |
tree | 845f7e0aa92d35055f67fc3e90c5040eb13f3c47 /drivers/usb/dwc2/gadget.c | |
parent | cd0e641c8da3c763f1f4b838a9bc30f1297f68d0 (diff) |
usb: dwc2: gadget: abort core init if core_reset fails
No point of continue with initialization if core is not in a sane
state.
Signed-off-by: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Tested-by: John Youn <johnyoun@synopsys.com>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc2/gadget.c')
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 1a216c51bbe4..af4f0c165d05 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -2287,7 +2287,8 @@ void dwc2_hsotg_core_init_disconnected(struct dwc2_hsotg *hsotg, u32 val; if (!is_usb_reset) - dwc2_hsotg_corereset(hsotg); + if (dwc2_hsotg_corereset(hsotg)) + return; /* * we must now enable ep0 ready for host detection and then |