Skip to contentSkip to conversation

phy: renesas: rcar-gen3-usb2: disable pm_runtime in case of failure

PATCH Superseded Wang Li 2 participants 2 messages Nov 25, 2020

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Wang Li

author
#0 lore raw

PATCH 1/1 phy: renesas: rcar-gen3-usb2: disable pm_runtime in case of failure

pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced.

Fixes 5d8042e95fd4 ("phy: rcar-gen3-usb2: Add support for r8a77470")
---
 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/phy/renesas/phy-rcar-gen3-usb2.c +4 -2
index e34e4475027c..2cb949f931b6 100644
@@ -656,8 +656,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++) {
Signature · 1 line
2.25.4
#1 lore raw

Hello!

Quoted 1 line · Wang Li

pm_runtime_enable will increase power disable depth. Thus a pairing

Decrease?

Quoted 1 line

decrement is needed on the error handling path to keep it balanced.

Increment?

Quoted 3 lines
Fixes 5d8042e95fd4 ("phy: rcar-gen3-usb2: Add support for r8a77470")

[...]

MBR, Sergei