lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z77kb2a_Vhln0reU@kuha.fi.intel.com>
Date: Wed, 26 Feb 2025 11:52:47 +0200
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Johan Hovold <johan+linaro@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	Abel Vesa <abel.vesa@...aro.org>
Subject: Re: [PATCH] usb: typec: ps883x: fix probe error handling

On Tue, Feb 18, 2025 at 09:22:43AM +0100, Johan Hovold wrote:
> Fix the probe error handling to avoid unbalanced clock disable or
> leaving regulators on after probe failure.
> 
> Note that the active-low reset pin should also be asserted to avoid
> leaking current after disabling the regulators.
> 
> Fixes: 257a087c8b52 ("usb: typec: Add support for Parade PS8830 Type-C Retimer")
> Cc: Abel Vesa <abel.vesa@...aro.org>
> Signed-off-by: Johan Hovold <johan+linaro@...nel.org>

Reviewed-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>

> ---
>  drivers/usb/typec/mux/ps883x.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c
> index 10e407ab6b7f..ef086989231f 100644
> --- a/drivers/usb/typec/mux/ps883x.c
> +++ b/drivers/usb/typec/mux/ps883x.c
> @@ -387,10 +387,11 @@ static int ps883x_retimer_probe(struct i2c_client *client)
>  
>  err_switch_unregister:
>  	typec_switch_unregister(retimer->sw);
> -err_vregs_disable:
> -	ps883x_disable_vregs(retimer);
>  err_clk_disable:
>  	clk_disable_unprepare(retimer->xo_clk);
> +err_vregs_disable:
> +	gpiod_set_value(retimer->reset_gpio, 1);
> +	ps883x_disable_vregs(retimer);
>  err_mux_put:
>  	typec_mux_put(retimer->typec_mux);
>  err_switch_put:
> -- 
> 2.45.3

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ