From patchwork Tue Jan 23 15:45:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 125550 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1832461ljf; Tue, 23 Jan 2018 07:46:08 -0800 (PST) X-Google-Smtp-Source: AH8x224uPOEI6cEDpQETbSuHLVE/t1AhSAeCvyKdlTt3VJKPkFDlquoHlE2o1eTpI4hT/XEQyOH9 X-Received: by 10.36.114.149 with SMTP id x143mr4393630itc.82.1516722368424; Tue, 23 Jan 2018 07:46:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516722368; cv=none; d=google.com; s=arc-20160816; b=LBwNERsrluoWwVgtUgGbADmwFYjm6VZk7ejldAlX5Xanj5+awYPD/CmJN3XaHLnKLW ij3kQtglLljfuOxL9A0LMIKXOUFMrxN4KgUfJqab67ovhood388VO+pt6I8d5KA/5PuQ Q/vGbRyTK+f4hs0j1dyUaHOMaiWrPHw+TzdqQMFMgU3hC6+Vp6v5vtxtQ68+qKuotqD2 RJMMiQoQYIwyQwFnjEQvbjxiUJojx4+mL7O27aOLFWlXnS9UzaV5nMgqARnzU6fjSl+C 8tkEmLXpAP7egegbePB/U335kCmPqdq8Er1rklh38ExzZIPSmh5Adwp6GeGsj/48mEoN yYvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=nJE88CnPNG9mdVX63SLs0SDn9+W7dqnlhGBEfu1tcYU=; b=lLszutnUn3+fJsLIkhdPSNnn1fyclDQp6gqjBaOxcn2dPGT1KQgmy2kBt31LlYUfmN bAxzIt9HnpE1/iwlb74ix5LEHUzkSMTtpmzkkdewkSmEVSW0kaNbwUhKk5WDCVUXVBEC YXIRYYnvX4N7fSLpih66rNg92SRXYWLWeO94zsB3HAA3LSPdorBMYh1kcBMUvobGpPMn zIRAY+JiW9f6eyFCbm7mGiehhQoyTKvxr5ZDM1XinTOl2qfVPEna52xhBRI/Nb2olJSd 2sND0HwGS/DTBQkBs2m3vkAMfC5+Tv6PEt+dZvCqhstxIbCloXyxULWLP/vEArWg9XVM H/DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CjFS/CRM; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n126si8260643itd.147.2018.01.23.07.46.08; Tue, 23 Jan 2018 07:46:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CjFS/CRM; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751551AbeAWPqG (ORCPT + 6 others); Tue, 23 Jan 2018 10:46:06 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:45597 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751588AbeAWPqC (ORCPT ); Tue, 23 Jan 2018 10:46:02 -0500 Received: by mail-pf0-f195.google.com with SMTP id a88so603637pfe.12 for ; Tue, 23 Jan 2018 07:46:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fwtSki4memuzbfsYnQr4sd2WmbLzKVJPXbbu1bPrUOc=; b=CjFS/CRMgsBiSCxSqQ+x0AeRk7qtld76vuOHuxkxCaRtsnAmy2ZZKfnBCg9T6Qanwc C9M4YNbJwjO1EuFvvYkZu2Pl0/u9fufbHDtfU2KlJWQe/XEsa8yeco3qDVXR4nkjkdID QcKRxA70VJupCkxCbHSBOPZyDni81Sxs2+SgM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fwtSki4memuzbfsYnQr4sd2WmbLzKVJPXbbu1bPrUOc=; b=p0V8IzoFI6A8Z3x884CEWFYH5WLUL8i6rsZFEkVC22MqoWxzd84oYP1NZu8tqLHPEz 2PzA18N2GTMNTA8JQ7H0BueDMCcTdi0L+aeEUF5bedIA6miQ7w0iWN+8C6Q0BE2VBUdu 2yJKUH7aw2Gy8cUOiThqrg3X7cQ8SEL+6wspSQCx8gTbv3IEpXaOA+lLhTDMr9i6FJdm PSw+jM+32x3V6LpLVICNf5AP1a9ZVw/i4oo1W61WSspDSJMK7T5wo2eMBaZU+nIO4aT5 G3sjvZN13unNpYLO2yWPWxiUgJkVUJ/hdFRoCvJp+n4L1LdSmHAs5yEun5tY+JHyXkYF /C4g== X-Gm-Message-State: AKwxytcIRCTYuL3TbZNrWfmgoOwLjR2bbmVa11DrQySWP0bt5R4rXuvA xm3u9la3Nw6UvR38DyHxi7/Sjw== X-Received: by 2002:a17:902:6087:: with SMTP id s7-v6mr5775488plj.6.1516722360567; Tue, 23 Jan 2018 07:46:00 -0800 (PST) Received: from localhost.localdomain ([45.56.152.94]) by smtp.gmail.com with ESMTPSA id v15sm7229037pfa.68.2018.01.23.07.45.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Jan 2018 07:45:59 -0800 (PST) From: Shawn Guo To: Bjorn Helgaas Cc: Rob Herring , Fabio Estevam , Jianguo Sun , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, project-aspen-dev@linaro.org, Shawn Guo Subject: [PATCH v2 1/2] PCI: histb: fix error path of histb_pcie_host_enable() Date: Tue, 23 Jan 2018 23:45:36 +0800 Message-Id: <1516722337-1533-2-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516722337-1533-1-git-send-email-shawn.guo@linaro.org> References: <1516722337-1533-1-git-send-email-shawn.guo@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org If clk_prepare_enable() call fails on a particular clock, we should not call clk_disable_unprepare() on this clock, but on the clocks that succeed from clk_prepare_enable() previously. Signed-off-by: Shawn Guo --- drivers/pci/dwc/pcie-histb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/dwc/pcie-histb.c b/drivers/pci/dwc/pcie-histb.c index 33b01b734d7d..6395394be5b4 100644 --- a/drivers/pci/dwc/pcie-histb.c +++ b/drivers/pci/dwc/pcie-histb.c @@ -279,13 +279,12 @@ static int histb_pcie_host_enable(struct pcie_port *pp) return 0; err_aux_clk: - clk_disable_unprepare(hipcie->aux_clk); -err_pipe_clk: clk_disable_unprepare(hipcie->pipe_clk); -err_sys_clk: +err_pipe_clk: clk_disable_unprepare(hipcie->sys_clk); -err_bus_clk: +err_sys_clk: clk_disable_unprepare(hipcie->bus_clk); +err_bus_clk: return ret; }