[PATCH] usb: dwc3: st: Propagate reset deassert failures

Thinh Nguyen Thinh.Nguyen at synopsys.com
Fri Jun 26 15:07:35 PDT 2026


On Wed, Jun 24, 2026, Pengpeng Hou wrote:
> The ST DWC3 glue driver treats the powerdown and softreset reset
> controls as required resources, but ignores reset_control_deassert()
> failures before populating the child DWC3 device.  Resume ignores the
> same failures before returning success.
> 
> Check the deassert operations and unwind the already deasserted
> powerdown reset if softreset deassertion fails.
> 
> Signed-off-by: Pengpeng Hou <pengpeng at iscas.ac.cn>
> ---
>  drivers/usb/dwc3/dwc3-st.c | 19 +++++++++++++++----
>  1 file changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c
> index 5d513decaacd..bbabfd933798 100644
> --- a/drivers/usb/dwc3/dwc3-st.c
> +++ b/drivers/usb/dwc3/dwc3-st.c
> @@ -242,7 +242,9 @@ static int st_dwc3_probe(struct platform_device *pdev)
>  				     "could not get power controller\n");
>  
>  	/* Manage PowerDown */
> -	reset_control_deassert(dwc3_data->rstc_pwrdn);
> +	ret = reset_control_deassert(dwc3_data->rstc_pwrdn);
> +	if (ret)
> +		return ret;
>  
>  	dwc3_data->rstc_rst =
>  		devm_reset_control_get_shared(dev, "softreset");
> @@ -253,7 +255,9 @@ static int st_dwc3_probe(struct platform_device *pdev)
>  	}
>  
>  	/* Manage SoftReset */
> -	reset_control_deassert(dwc3_data->rstc_rst);
> +	ret = reset_control_deassert(dwc3_data->rstc_rst);
> +	if (ret)
> +		goto undo_powerdown;

This should goto undo_softreset instead of undo_powerdown.

BR,
Thinh


More information about the linux-arm-kernel mailing list