]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: chipidea: ci_hdrc_imx: fix call balance of regulator routines
authorFedor Pchelkin <pchelkin@ispras.ru>
Sun, 16 Mar 2025 10:26:55 +0000 (13:26 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:46:59 +0000 (07:46 +0200)
commitd2daafc3f0b4d14a21ea5de2e91a32ab3aa4cad2
tree81afdc32cd59f5560df89dbff000fbaf8f5047fc
parent0ee460498ced49196149197c9f6d29a10e5e0798
usb: chipidea: ci_hdrc_imx: fix call balance of regulator routines

commit 8cab0e9a3f3e8d700179e0d6141643d54a267fd5 upstream.

Upon encountering errors during the HSIC pinctrl handling section the
regulator should be disabled.

Use devm_add_action_or_reset() to let the regulator-disabling routine be
handled by device resource management stack.

Found by Linux Verification Center (linuxtesting.org).

Fixes: 4d6141288c33 ("usb: chipidea: imx: pinctrl for HSIC is optional")
Cc: stable <stable@kernel.org>
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20250316102658.490340-3-pchelkin@ispras.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/ci_hdrc_imx.c