On 9/9/2015 3:21 AM, Mian Yousaf Kaukab wrote:
> From: Gregory Herrero <gregory.herr...@intel.com>
> 
> No point of continue with initialization if core is not in a sane
> state.
> 
> Signed-off-by: Gregory Herrero <gregory.herr...@intel.com>
> Signed-off-by: Mian Yousaf Kaukab <yousaf.kau...@intel.com>
> Tested-by: Robert Baldyga <r.bald...@samsung.com>
> ---
>  drivers/usb/dwc2/gadget.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index 8783af8..e35b052 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))
> +                     goto core_init_abort;

It's cleaner just to return.

John

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to