From patchwork Fri Jun 16 12:45:39 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: 105742 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp1259203obh; Fri, 16 Jun 2017 05:50:56 -0700 (PDT) X-Received: by 10.99.122.85 with SMTP id j21mr11305970pgn.142.1497617456591; Fri, 16 Jun 2017 05:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497617456; cv=none; d=google.com; s=arc-20160816; b=TqIUoJHT6j2zcyCwcIlNq7JopF7323u3utVitcaXNC/dsdb4IzyTDJqNPGVXdd3Mfq khWLNVYIEQAt7a7ZR3QebTz0QGIiCkw+M9j8hSl9U4v+xo0c+KoWrnZOj7rrcBUaDlAE zVYupC5r9W3Dg31dlv9Jyg4CQ1nn6wyIXUpZwu2qmt+8H3k/q4ELk/lrd2mw4Ukmbxj5 rqqYYdcDHwemUGusi6OUjHRSXItCH6EAWfD3RRH4XYS2TPXKOxPwne5a8FdLOIBcBSeY gHkaat4yyddoA7r9ZOX+4Yoj/VaTYdGd2M8+JCu+wFCUvWsqhCP5uXUKTYgmmQMfsuLJ 5QhQ== 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=AQgnWsVVXPpTB8QCDYISHEUH00Flk6eAFEq0O/Z6Q1M=; b=sir84uf+z5rBKGiPvoC+D+0+Sp6m5bhweNN+PmqeBwbN1utaBSvEFYFtIGL+K1tCyQ AvguWLIV4ZsPEbjIOmc74kiwpFF2Ti2JAyK3+M6/KXkUtbBdiacCxFqeR+J28w6Z5PDp QUI+m2ILTjg9ZRpF1y08Q6/jwiygfYcC0MU+vMlOE/V6VVXATb7deisr6jc8mcRiotmX rj+/kjkJdojfFGp7WOdTuNqIrD9DzNzQ3fwEN9Ku+8EdcSACK5QACwWLo9GF4ic0+msc EEJCqPmGVbYCsnbGxcp2iyAhuCZJHyan+yZnmdqIV+AJbz+ZLbG0R5qFFk2WgyheRFUD FvtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.b=T7NhSEBF; 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 u26si1891783pfa.258.2017.06.16.05.50.56; Fri, 16 Jun 2017 05:50:56 -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 header.b=T7NhSEBF; 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 S1753976AbdFPMue (ORCPT + 25 others); Fri, 16 Jun 2017 08:50:34 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:60025 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753214AbdFPMq7 (ORCPT ); Fri, 16 Jun 2017 08:46:59 -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 v5GCkcch013756; Fri, 16 Jun 2017 07:46:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1497617198; bh=pBLOwxI6YFEa7mrg0McW+jdv5XqPcY5Vs6UBt2lDn9k=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=T7NhSEBFVO2jkNHzrpM6k++FNNPA4Cz9pzyKCmsyvXLGsj55EgX9ZOrr3+uHdF4Gg dASSqUgQlg6BLw0CCzvAfK+HPCqpfkblCOPzeJLMgX2/2IkVK8CfONSPFWIBYG/Zjg +VXuiu3334McG1wrORKFiyAagYIr0AdKJKOo35Lk= Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v5GCkcfV013002; Fri, 16 Jun 2017 07:46:38 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Fri, 16 Jun 2017 07:46:37 -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 v5GCjjBn000652; Fri, 16 Jun 2017 07:46:34 -0500 From: Kishon Vijay Abraham I To: Ulf Hansson , Rob Herring , Tony Lindgren , CC: Russell King , Ravikumar Kattekola , , , , , , Subject: [PATCH 11/16] mmc: host: omap_hsmmc: Fix error path sequence Date: Fri, 16 Jun 2017 18:15:39 +0530 Message-ID: <20170616124544.15046-12-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170616124544.15046-1-kishon@ti.com> References: <20170616124544.15046-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 9d59fe611498..967b7c7d4bd5 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -2591,16 +2591,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);