Re: [PATCH] usb: core: don't power off roothub PHYs if phy_set_mode() fails
From: Miquel Raynal
Date: Fri Feb 20 2026 - 08:46:55 EST
On 18/02/2026 at 21:21:07 +01, Gabor Juhos <j4g8y7@xxxxxxxxx> wrote:
> Remove the error path from the usb_phy_roothub_set_mode() function.
> The code is clearly wrong, because phy_set_mode() calls can't be
> balanced with phy_power_off() calls.
>
> Additionally, the usb_phy_roothub_set_mode() function is called only
> from usb_add_hcd() before it powers on the PHYs, so powering off those
> makes no sense anyway.
>
> Presumably, the code is copy-pasted from the phy_power_on() function
> without adjusting the error handling.
>
> Cc: stable@xxxxxxxxxxxxxxx # v5.1+
> Fixes: b97a31348379 ("usb: core: comply to PHY framework")
> Signed-off-by: Gabor Juhos <j4g8y7@xxxxxxxxx>
Reviewed-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>