From patchwork Fri Mar 2 01:12:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 130434 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp719787lja; Thu, 1 Mar 2018 17:12:41 -0800 (PST) X-Google-Smtp-Source: AG47ELvpkZLnM9X7UJzjlcpOGLq47JDzsEICqjGQNZkdzpvnp7RpuSJKZcW4hUYixqjoDwc4yM+o X-Received: by 2002:a17:902:7142:: with SMTP id u2-v6mr3646843plm.257.1519953160887; Thu, 01 Mar 2018 17:12:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519953160; cv=none; d=google.com; s=arc-20160816; b=cETHw0O7Q2X3dF9vKXx/bpnvOGxBtesY/YcOowctktQAioniTVxG3Zl1kK57Z4QzVI oUu2wjVmjl+e6EFi0JGJbzuzVy/O16Gd2suF6XNvj4mJzQI2EC+xJY6beIf6sTP5NXOt /qOSBgjyKwI05MJGKXFXRnJdbvTiOFIQ752y6OF62bYBJaDmEsOz8b4moZItD70ko+8b JU2kXrfHi/Gf9J+ebwgGirBbu1UFfsGC3NPqOKCXUrGVVrZL8ZVlLoDtHC+fUEASMOQE VGnykYwNfinUqqD9vC6r7gnF6Ur+yscfETRRn70YIoGXyiWhq/rlheATWjEeBmU82CV9 qDJA== 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=n1TkqOzUlRJvLceLarX+De/iukZNHFpugL8WRCzGloU=; b=lt9xXIl5ijgUv9cUU4mpKxlHjiI0WYpZUK9kVUpyBhMTXqUlmuyFF4neDmL+8b+j5r 1Td5bxBKEIhxeu2NJ7qAZar4c9i3wb7LEwyGwfzDko5DKwvBee90TM5X1AFzytFtZxmi wMbyNCsVwSdqaNXVAB9AukGFHz4RA0OKdXjaXJtjh5bVi3CjjYIUicRrg2UuBBFJo43R T3RYXRu4TQdPGLJ/WnBYdF6yFox4YhFI4FwCgS3vlOf5OdM69F237eF5YsuEw+th1dBE G7DjnIO4q8Vp7Iqh40xDTEw32NM1MTqNlV+0PNln8gLTWbYG1M+ST0SGhorwfO2tvp8v pfdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=JtdbZQjJ; 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 2-v6si3921878plc.205.2018.03.01.17.12.40; Thu, 01 Mar 2018 17:12:40 -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=JtdbZQjJ; 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 S1163374AbeCBBMj (ORCPT + 6 others); Thu, 1 Mar 2018 20:12:39 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:38298 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163354AbeCBBMh (ORCPT ); Thu, 1 Mar 2018 20:12:37 -0500 Received: by mail-pl0-f68.google.com with SMTP id m22-v6so1190554pls.5 for ; Thu, 01 Mar 2018 17:12:37 -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=P08v0/FmDvjICZ5/0nzvHv9y9km/6gmCuEJXAxI+FpY=; b=JtdbZQjJL8kiucLPlKq9kbkD/ogdTbaIqBHGMwkMa9BCIKSsM6+gJvqTWiwppNmJ2N P/t++ShBCuQcQGYsUjSf/ao0SUqA477s4m1zVZNyFy9etYqVCxYHfz+9ueapB1Ym7as0 FZAa8VkXDkQX7Wuja8jHsX0cTqOad57huurMo= 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=P08v0/FmDvjICZ5/0nzvHv9y9km/6gmCuEJXAxI+FpY=; b=S/OHteVd1uJ+LtnjwRP3PbAE54UXd34/XYEKdm9KkACgH4j7C/O3SUglT0KaZtcYE7 TJABUkPZlqAHY53ZJ2uSJHBrHozGuue9s1ROszDqv8oTr4jBfOK+LuE/Uzj97cV2tcM9 m35eq0lwwlqVu/aDTsSL6hwVNRQNbncwVuT4h09v7c5Diq7mq7rERWpN5SQ3WtOfTaZ/ Nz348rRNsV22uJ6o7F1UiRcWZ1P9xsuHUk3FdOOl7JZRyBnjdJJJpTT5v5iMDBvwIk7f ZotVaQbnglvk/DXeHdXC8nZJprXwL7pSt45T3V5XcIxfRqHjFSSJYlReM3jPFoPSdAbi kxLw== X-Gm-Message-State: APf1xPCVn7RtBotp/l2pUZPMXQN833k/pOHZkXaiHfNZ4+46WMDsLvLh Y2uJScMhjCfdI+/qHecILng+Zg== X-Received: by 2002:a17:902:146:: with SMTP id 64-v6mr3398676plb.30.1519953157486; Thu, 01 Mar 2018 17:12:37 -0800 (PST) Received: from localhost.localdomain ([45.56.152.106]) by smtp.gmail.com with ESMTPSA id z22sm2186864pfd.158.2018.03.01.17.12.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Mar 2018 17:12:36 -0800 (PST) From: Shawn Guo To: Lorenzo Pieralisi Cc: Bjorn Helgaas , Rob Herring , Fabio Estevam , Jianguo Sun , Jiancheng Xue , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, Shawn Guo Subject: [PATCH v3 1/2] PCI: histb: Fix error path of histb_pcie_host_enable() Date: Fri, 2 Mar 2018 09:12:00 +0800 Message-Id: <1519953121-28218-2-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1519953121-28218-1-git-send-email-shawn.guo@linaro.org> References: <1519953121-28218-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 70b5c0b108bf..17ed604f5741 100644 --- a/drivers/pci/dwc/pcie-histb.c +++ b/drivers/pci/dwc/pcie-histb.c @@ -276,13 +276,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; }