All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: renesas: rcar-gen3-usb2: disable pm_runtime in case of failure
@ 2020-11-25  2:31 Wang Li
  2020-11-25  8:16 ` Sergei Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Li @ 2020-11-25  2:31 UTC (permalink / raw)
  To: yoshihiro.shimoda.uh, kishon, vkoul, biju.das; +Cc: linux-renesas-soc, wangli74

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")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Li <wangli74@huawei.com>
---
 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 6 ++++--
 1 file 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 e34e4475027c..2cb949f931b6 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -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++) {
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-25  8:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-25  2:31 [PATCH] phy: renesas: rcar-gen3-usb2: disable pm_runtime in case of failure Wang Li
2020-11-25  8:16 ` Sergei Shtylyov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.