From patchwork Thu Oct 1 07:22:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 7305651 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3A9BA9F1D5 for ; Thu, 1 Oct 2015 07:22:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6D98F207F0 for ; Thu, 1 Oct 2015 07:22:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D41F20807 for ; Thu, 1 Oct 2015 07:22:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756044AbbJAHWO (ORCPT ); Thu, 1 Oct 2015 03:22:14 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:51628 "EHLO michel.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755835AbbJAHWM (ORCPT ); Thu, 1 Oct 2015 03:22:12 -0400 Received: from ayla.of.borg ([84.195.106.123]) by michel.telenet-ops.be with bizsmtp id PjNB1r00V2fm56U06jNBja; Thu, 01 Oct 2015 09:22:11 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1ZhYBv-00013c-8S; Thu, 01 Oct 2015 09:22:11 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1ZhYC4-0008P2-QP; Thu, 01 Oct 2015 09:22:20 +0200 From: Geert Uytterhoeven To: Vinod Koul , Yoshihiro Shimoda Cc: Sergei Shtylyov , dmaengine@vger.kernel.org, linux-sh@vger.kernel.org, linux-pm@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 2/2] dmaengine: usb-dmac: Fix pm_runtime_{enable, disable}() imbalance Date: Thu, 1 Oct 2015 09:22:18 +0200 Message-Id: <1443684138-32252-3-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443684138-32252-1-git-send-email-geert+renesas@glider.be> References: <1443684138-32252-1-git-send-email-geert+renesas@glider.be> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the call to pm_runtime_get_sync() failed, Runtime PM was left enabled. Signed-off-by: Geert Uytterhoeven --- 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; }