Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
* [PATCH v2] phy: renesas: rcar-gen3-usb2: disable runtime pm in case of failure
@ 2020-11-26  2:44 Wang Li
  2020-12-05  8:06 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Li @ 2020-11-26  2:44 UTC (permalink / raw)
  To: yoshihiro.shimoda.uh, kishon, vkoul, biju.das; +Cc: linux-renesas-soc, wangli74

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>
---
Changelog:
v2
- Correct the commit message.
---
 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

* Re: [PATCH v2] phy: renesas: rcar-gen3-usb2: disable runtime pm in case of failure
  2020-11-26  2:44 [PATCH v2] phy: renesas: rcar-gen3-usb2: disable runtime pm in case of failure Wang Li
@ 2020-12-05  8:06 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2020-12-05  8:06 UTC (permalink / raw)
  To: Wang Li; +Cc: yoshihiro.shimoda.uh, kishon, biju.das, linux-renesas-soc

On 26-11-20, 10:44, Wang Li wrote:
> pm_runtime_enable() will decrease power disable depth. Thus a pairing
> increment is needed on the error handling path to keep it balanced.

Applied, thanks

-- 
~Vinod

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

end of thread, other threads:[~2020-12-05  8:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-26  2:44 [PATCH v2] phy: renesas: rcar-gen3-usb2: disable runtime pm in case of failure Wang Li
2020-12-05  8:06 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox