]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
usb: dwc3: meson-g12a: Disable the regulator in the error handling path of the probe
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 21 May 2021 16:55:50 +0000 (18:55 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 15 Jul 2021 17:24:03 +0000 (19:24 +0200)
commit9e36273bfd9970de5d9bf0e4c9293c79d00f8eeb
tree4eb53a464bf1ca034d6d83e25401cb3409bed876
parent9507ff3a6effc0ea9152940723d138b07cc5cd23
usb: dwc3: meson-g12a: Disable the regulator in the error handling path of the probe

BugLink: https://bugs.launchpad.net/bugs/1934012
commit 1d0d3d818eafe1963ec1eaf302175cd14938188e upstream.

If an error occurs after a successful 'regulator_enable()' call,
'regulator_disable()' must be called.

Fix the error handling path of the probe accordingly.

The remove function doesn't need to be fixed, because the
'regulator_disable()' call is already hidden in 'dwc3_meson_g12a_suspend()'
which is called via 'pm_runtime_set_suspended()' in the remove function.

Fixes: c99993376f72 ("usb: dwc3: Add Amlogic G12A DWC3 glue")
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/79df054046224bbb0716a8c5c2082650290eec86.1621616013.git.christophe.jaillet@wanadoo.fr
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/usb/dwc3/dwc3-meson-g12a.c