mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: <gregkh@linuxfoundation.org>
Cc: <kishon@ti.com>, <linux-kernel@vger.kernel.org>,
	Roger Quadros <rogerq@ti.com>
Subject: [PATCH 4/5] phy: omap-usb2: invoke pm_runtime_disable on error path
Date: Tue, 12 May 2015 21:29:33 +0530	[thread overview]
Message-ID: <1431446374-31573-5-git-send-email-kishon@ti.com> (raw)
In-Reply-To: <1431446374-31573-1-git-send-email-kishon@ti.com>

if devm_clk_get for wkupclk fails, there will be an unbalanced
pm_runtime_enable. Fix it here.

Reported-by: Benoit Parrot <bparrot@ti.com>
Cc: Roger Quadros <rogerq@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/phy/phy-omap-usb2.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
index 183ef43..c1a4686 100644
--- a/drivers/phy/phy-omap-usb2.c
+++ b/drivers/phy/phy-omap-usb2.c
@@ -275,6 +275,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
 		phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
 		if (IS_ERR(phy->wkupclk)) {
 			dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n");
+			pm_runtime_disable(phy->dev);
 			return PTR_ERR(phy->wkupclk);
 		} else {
 			dev_warn(&pdev->dev,
-- 
1.7.9.5


  parent reply	other threads:[~2015-05-12 15:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 15:59 [GIT PULL 0/5] phy: fixes for v4.1-rc Kishon Vijay Abraham I
2015-05-12 15:59 ` [PATCH 1/5] phy: core: Fix error checking in (devm_)phy_optional_get Kishon Vijay Abraham I
2015-05-12 15:59 ` [PATCH 2/5] phy: qcom-ufs: Switch dependency to ARCH_QCOM Kishon Vijay Abraham I
2015-05-12 15:59 ` [PATCH 3/5] phy: fix Kconfig dependencies Kishon Vijay Abraham I
2015-05-12 15:59 ` Kishon Vijay Abraham I [this message]
2015-05-12 15:59 ` [PATCH 5/5] phy: phy-rcar-gen2: Fix USBHS_UGSTS_LOCK value Kishon Vijay Abraham I
2015-05-20 15:11 ` [GIT PULL 0/5] phy: fixes for v4.1-rc Kishon Vijay Abraham I
2015-05-24 18:07   ` Greg KH
2015-05-27 15:29     ` Kishon Vijay Abraham I

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=1431446374-31573-5-git-send-email-kishon@ti.com \
    --to=kishon@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rogerq@ti.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

all inboxes | Powered by JetHome®