aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy
diff options
context:
space:
mode:
authorWang Li <wangli74@huawei.com>2020-11-26 10:44:12 +0800
committerVinod Koul <vkoul@kernel.org>2020-12-05 13:36:12 +0530
commit51e339deab1e51443f6ac3b1bd5cd6cc8e8fe1d9 (patch)
tree9651c32421622db1bf96bfa11a5cdca46d6e4a3f /drivers/phy
parentphy: mediatek: allow compile-testing the hdmi phy (diff)
downloadlinux-dev-51e339deab1e51443f6ac3b1bd5cd6cc8e8fe1d9.tar.xz
linux-dev-51e339deab1e51443f6ac3b1bd5cd6cc8e8fe1d9.zip
phy: renesas: rcar-gen3-usb2: disable runtime pm in case of failure
pm_runtime_enable() will decrease power disable depth. Thus a pairing increment is needed on the error handling path to keep it balanced. Fixes: 5d8042e95fd4 ("phy: rcar-gen3-usb2: Add support for r8a77470") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wang Li <wangli74@huawei.com> Link: https://lore.kernel.org/r/20201126024412.4046845-1-wangli74@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/renesas/phy-rcar-gen3-usb2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index 1898bbe7c8e5..fbc55232120e 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -654,8 +654,10 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
*/
pm_runtime_enable(dev);
phy_usb2_ops = of_device_get_match_data(dev);
- if (!phy_usb2_ops)
- return -EINVAL;
+ if (!phy_usb2_ops) {
+ ret = -EINVAL;
+ goto error;
+ }
mutex_init(&channel->lock);
for (i = 0; i < NUM_OF_PHYS; i++) {