From: Chris Zhong <zyw@rock-chips.com>
To: kishon@ti.com, groeck@chromium.org, wulf@rock-chips.com,
briannorris@chromium.org, heiko@sntech.de, dianders@chromium.org,
kever.yang@rock-chips.com
Cc: linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
Chris Zhong <zyw@rock-chips.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] phy: rockchip-typec: add pm_runtime_disable in err case
Date: Thu, 8 Sep 2016 10:38:11 -0700 [thread overview]
Message-ID: <1473356291-19247-1-git-send-email-zyw@rock-chips.com> (raw)
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
next reply other threads:[~2016-09-08 17:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-08 17:38 Chris Zhong [this message]
2016-09-08 18:05 ` [PATCH] phy: rockchip-typec: add pm_runtime_disable in err case Brian Norris
2017-11-28 22:02 ` Doug Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473356291-19247-1-git-send-email-zyw@rock-chips.com \
--to=zyw@rock-chips.com \
--cc=briannorris@chromium.org \
--cc=dianders@chromium.org \
--cc=groeck@chromium.org \
--cc=heiko@sntech.de \
--cc=kever.yang@rock-chips.com \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=wulf@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox