linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Vinod Koul <vinod.koul@intel.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	dmaengine@vger.kernel.org, linux-sh@vger.kernel.org,
	linux-pm@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH 2/2] dmaengine: usb-dmac: Fix pm_runtime_{enable,disable}() imbalance
Date: Thu, 01 Oct 2015 07:22:18 +0000	[thread overview]
Message-ID: <1443684138-32252-3-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1443684138-32252-1-git-send-email-geert+renesas@glider.be>

If the call to pm_runtime_get_sync() failed, Runtime PM was left
enabled.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/dma/sh/usb-dmac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/sh/usb-dmac.c b/drivers/dma/sh/usb-dmac.c
index f305738b5adf8cc9..f1bcc2a163b30cef 100644
--- a/drivers/dma/sh/usb-dmac.c
+++ b/drivers/dma/sh/usb-dmac.c
@@ -802,7 +802,7 @@ static int usb_dmac_probe(struct platform_device *pdev)
 	ret = pm_runtime_get_sync(&pdev->dev);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "runtime PM get sync failed (%d)\n", ret);
-		return ret;
+		goto error_pm;
 	}
 
 	ret = usb_dmac_init(dmac);
@@ -859,6 +859,7 @@ static int usb_dmac_probe(struct platform_device *pdev)
 error:
 	of_dma_controller_free(pdev->dev.of_node);
 	pm_runtime_put(&pdev->dev);
+error_pm:
 	pm_runtime_disable(&pdev->dev);
 	return ret;
 }
-- 
1.9.1


  parent reply	other threads:[~2015-10-01  7:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01  7:22 [PATCH 0/2] dmaengine: usb-dmac: Runtime PM Related Fixes Geert Uytterhoeven
2015-10-01  7:22 ` [PATCH 1/2] dmaengine: usb-dmac: Fix crash on runtime suspend Geert Uytterhoeven
2015-10-01 10:53   ` Yoshihiro Shimoda
2015-10-01 12:26     ` Sergei Shtylyov
2015-10-02  1:00       ` Yoshihiro Shimoda
2015-10-02 10:54         ` Sergei Shtylyov
2015-10-01  7:22 ` Geert Uytterhoeven [this message]
2015-10-07 14:01 ` [PATCH 0/2] dmaengine: usb-dmac: Runtime PM Related Fixes Vinod Koul
2015-10-16 13:10   ` Geert Uytterhoeven
2015-10-24 12:16     ` Vinod Koul
2015-10-24 17:59       ` Geert Uytterhoeven
2015-10-24 22:56         ` Vinod Koul

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=1443684138-32252-3-git-send-email-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=vinod.koul@intel.com \
    --cc=yoshihiro.shimoda.uh@renesas.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;
as well as URLs for NNTP newsgroup(s).