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>
This commit is contained in:
Gregory Herrero 2015-09-29 12:08:21 +02:00 committed by Felipe Balbi
parent cd0e641c8d
commit 86de489536
1 changed files with 2 additions and 1 deletions

View File

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