From patchwork Fri May 19 08:15:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 100179 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp204797qge; Fri, 19 May 2017 01:29:36 -0700 (PDT) X-Received: by 10.99.9.130 with SMTP id 124mr9159381pgj.22.1495182576758; Fri, 19 May 2017 01:29:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495182576; cv=none; d=google.com; s=arc-20160816; b=PQys+Ig170sKS50yOj9dwqtKdmW/JlfqVF/e0wrOc55n1WLJJFReMgFzy41Ge/FX7P hg/hGR/OAwOuRD4WVVpN2WYNPh9oKJNh8rKMSQz5vBMhrRaqLIHFv28zE6XhcW9gpnP3 QRneiKOGnN34bmt3Tor0p510PPB1I+IPttbbbU/dCBalug6JWG39vVmeEaLH6Q0ct2Na mdZQ/5hN+RPzAUf5lVWPqu99nCA7WC9sSdSGhT9yWsntBmPXohgetwen7DugKLTX8tOd bC6ES/3SXfSndTPQ5uIBYhkA2SDQ59GhtIlKiLwGmY+zG16DX8wFt4mCOhgycuyWb9vu Q6QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=FTsKJzLClYdhfd9vBTA5e8aPpYSZihkKajLCsS9O/Go=; b=fQJwS3Q1L9Qsn7cWH4W/Sh+8RG8r0Yt87sUOgKSy22ReGjQll15aGa/XoVOWkxaK70 pIJ9QppVCyEQQ6BUGl4msINeovGANRAHxL9ae7rIpIpwXmLF2IJGG+jqQnQvXj9iPvlQ Y44upWXNtahiAgkjqqbJhkb5TjMkdBEJvRS4tpTNG/R+DDc7rqJvjQLSyq/wb+5GabpV brhv3jtCKquUdfnDzhROVg+yR7ymd6b/yu8aCuakYfIV2nMRBQeCjGvHaiuaDPU/2RwT F2aSUd3PR0kse9z2bcnmS8+kODOE7JJqssb5KO88axpsqEt21oio7T+upqwCGHZB/Up5 gZbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q27si7733531pfk.48.2017.05.19.01.29.36; Fri, 19 May 2017 01:29:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755818AbdESI3I (ORCPT + 25 others); Fri, 19 May 2017 04:29:08 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:10335 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753542AbdESIRX (ORCPT ); Fri, 19 May 2017 04:17:23 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v4J8GenF018095; Fri, 19 May 2017 03:16:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1495181800; bh=zOIwWFil3i81BToGD7cDvCD0//xsjKaAS1dSVG6WWSU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=QU5Ih8ytBnTxMIGXcZuGq+Qq/8DD+fO4WYh6DQO8voWUmoIQHBufsUkqpR9CT1tz3 a6vh4SkNGABbG7AQIB9dqP44+6WHijz8pG8gOHMc70rpKffUmuiNkXya5kfJ9/8DVX HoaP0iojA681C07OBZAmFSLvsPudUdZhb6wgaU+8= Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v4J8Ge31026964; Fri, 19 May 2017 03:16:40 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Fri, 19 May 2017 03:16:40 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v4J8FfQJ009185; Fri, 19 May 2017 03:16:36 -0500 From: Kishon Vijay Abraham I To: Ulf Hansson , Rob Herring , Tony Lindgren CC: , , , , , , Jonathan Corbet , Mark Rutland , Russell King , , Subject: [PATCH 12/41] mmc: host: omap_hsmmc: Fix error path sequence Date: Fri, 19 May 2017 13:45:12 +0530 Message-ID: <20170519081541.26753-13-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170519081541.26753-1-kishon@ti.com> References: <20170519081541.26753-1-kishon@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the error path sequence so that clk_disable, runtime_disable etc are done in the reverse order of how they were enabled. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Sekhar Nori --- drivers/mmc/host/omap_hsmmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.11.0 diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 8114b8b73491..b28f0e9631ce 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -2602,16 +2602,16 @@ static int omap_hsmmc_probe(struct platform_device *pdev) err_slot_name: mmc_remove_host(mmc); err_irq: - device_init_wakeup(&pdev->dev, false); if (!IS_ERR_OR_NULL(host->tx_chan)) dma_release_channel(host->tx_chan); if (!IS_ERR_OR_NULL(host->rx_chan)) dma_release_channel(host->rx_chan); + if (host->dbclk) + clk_disable_unprepare(host->dbclk); pm_runtime_dont_use_autosuspend(host->dev); pm_runtime_put_sync(host->dev); pm_runtime_disable(host->dev); - if (host->dbclk) - clk_disable_unprepare(host->dbclk); + device_init_wakeup(&pdev->dev, false); err1: err_gpio: mmc_free_host(mmc);