usb: typec: ps883x: fix probe error handling
authorJohan Hovold <johan+linaro@kernel.org>
Tue, 18 Feb 2025 08:22:43 +0000 (09:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2025 14:16:02 +0000 (15:16 +0100)
commit834d1cb7ecf3f2812fc3c8cbe870cf2ad192f68e
tree564178808a75bc8d7a3847638439ab53972f94d4
parentba6e518d136b25b340ddedb97a79db5642e4ed7f
usb: typec: ps883x: fix probe error handling

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@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20250218082243.9318-1-johan+linaro@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/mux/ps883x.c