* [PATCH] phy: rockchip-typec: add pm_runtime_disable in err case
@ 2016-09-08 17:38 Chris Zhong
2016-09-08 18:05 ` Brian Norris
2017-11-28 22:02 ` Doug Anderson
0 siblings, 2 replies; 3+ messages in thread
From: Chris Zhong @ 2016-09-08 17:38 UTC (permalink / raw)
To: kishon, groeck, wulf, briannorris, heiko, dianders, kever.yang
Cc: linux-rockchip, linux-arm-kernel, Chris Zhong, linux-kernel
Add pm_runtime_disable in err case to make the pm_runtime_enable/disable
is invoked balanced.
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
---
drivers/phy/phy-rockchip-typec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/phy/phy-rockchip-typec.c b/drivers/phy/phy-rockchip-typec.c
index 7cfb0f8..dd257c7 100644
--- a/drivers/phy/phy-rockchip-typec.c
+++ b/drivers/phy/phy-rockchip-typec.c
@@ -977,6 +977,7 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
if (IS_ERR(phy)) {
dev_err(dev, "failed to create phy: %s\n",
child_np->name);
+ pm_runtime_disable(dev);
return PTR_ERR(phy);
}
@@ -986,6 +987,7 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
if (IS_ERR(phy_provider)) {
dev_err(dev, "Failed to register phy provider\n");
+ pm_runtime_disable(dev);
return PTR_ERR(phy_provider);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] phy: rockchip-typec: add pm_runtime_disable in err case
2016-09-08 17:38 [PATCH] phy: rockchip-typec: add pm_runtime_disable in err case Chris Zhong
@ 2016-09-08 18:05 ` Brian Norris
2017-11-28 22:02 ` Doug Anderson
1 sibling, 0 replies; 3+ messages in thread
From: Brian Norris @ 2016-09-08 18:05 UTC (permalink / raw)
To: Chris Zhong
Cc: kishon, groeck, wulf, heiko, dianders, kever.yang,
linux-rockchip, linux-arm-kernel, linux-kernel
On Thu, Sep 08, 2016 at 10:38:11AM -0700, Chris Zhong wrote:
> Add pm_runtime_disable in err case to make the pm_runtime_enable/disable
> is invoked balanced.
>
> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Makes sense.
Reviewed-by: Brian Norris <briannorris@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] phy: rockchip-typec: add pm_runtime_disable in err case
2016-09-08 17:38 [PATCH] phy: rockchip-typec: add pm_runtime_disable in err case Chris Zhong
2016-09-08 18:05 ` Brian Norris
@ 2017-11-28 22:02 ` Doug Anderson
1 sibling, 0 replies; 3+ messages in thread
From: Doug Anderson @ 2017-11-28 22:02 UTC (permalink / raw)
To: Chris Zhong
Cc: Kishon Vijay Abraham I, Guenter Roeck, wulf, Brian Norris,
Heiko Stübner, Kever.Yang, open list:ARM/Rockchip SoC...,
Linux ARM, LKML
Hi,
On Thu, Sep 8, 2016 at 10:38 AM, Chris Zhong <zyw@rock-chips.com> wrote:
> Add pm_runtime_disable in err case to make the pm_runtime_enable/disable
> is invoked balanced.
>
> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
>
> ---
>
> drivers/phy/phy-rockchip-typec.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/phy/phy-rockchip-typec.c b/drivers/phy/phy-rockchip-typec.c
> index 7cfb0f8..dd257c7 100644
> --- a/drivers/phy/phy-rockchip-typec.c
> +++ b/drivers/phy/phy-rockchip-typec.c
> @@ -977,6 +977,7 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
> if (IS_ERR(phy)) {
> dev_err(dev, "failed to create phy: %s\n",
> child_np->name);
> + pm_runtime_disable(dev);
> return PTR_ERR(phy);
> }
>
> @@ -986,6 +987,7 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
> phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
> if (IS_ERR(phy_provider)) {
> dev_err(dev, "Failed to register phy provider\n");
> + pm_runtime_disable(dev);
> return PTR_ERR(phy_provider);
> }
>
> --
> 1.9.1
The patch is a little stale, but it still tastes OK to me. Maybe a
good time to land it? :-P
Reviewed-by: Douglas Anderson <dianders@chromium.org>
-Doug
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-28 22:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08 17:38 [PATCH] phy: rockchip-typec: add pm_runtime_disable in err case Chris Zhong
2016-09-08 18:05 ` Brian Norris
2017-11-28 22:02 ` Doug Anderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).