Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2791347pxv; Sun, 27 Jun 2021 08:57:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4nDGFjZT/a26+PJAS+aAClFYWWms2cJybsFgI3nISZDAW9OFsxwD64RLrjlgBelX3BoV1 X-Received: by 2002:a05:6638:11c7:: with SMTP id g7mr16551131jas.11.1624809467837; Sun, 27 Jun 2021 08:57:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624809467; cv=none; d=google.com; s=arc-20160816; b=nDQAzNWlSaG7txyf3ajFoj6BMCWzPq5mV4zHCJcgDGtHVdh/UBge2TCvP5LySOiqky PIoE8AKZHtU/OX71/cPTeKQLFtRWD1MwGkDDrAVaenuotw147odfLfrkBM6SH+s05N+u XbCPsf8+2wm8FzAGiRxahs3pOofSCEThR/4GAIMMsBcQVc/1Uijijgc5DrNVBCDV/DTq LJVZ1lqHKsVA37cyCMGKosKQ1kcxK6HCGcE3vH3kIjv3qIJlb9BZddI7wkZQzIMMbQyd kHf9xikYVaL6bJN3M/vbZbDYpF5Uc7et1mCPI2LI9N9e/UVVSOW6+mojPX57vtJwCjis Y0Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ALHuPUjS6fUNkFxq+GItFGtbw6Z86NVT7HB2Ri6r21o=; b=y+fjkeQ9DZKnpbH6SjGhAN+k/OdTn0KxFabbrkh5gpEd4r+I/FlCYIn7kONaWxXe97 4CBV9ffGSsDxKpXEGT6WfQKvtK6mT05ADZujy4GsFu3IpursmRZWxflLApAR5PP69vBJ +YiwIdE3QUGCDK7T+V++mEloF47KL3Yn3V7XthVDkIsJWMIdqpvzrLkou7GR7J1MDGG2 4CBpAcdFBVeZOscLkEYSSdP5XLcXzEFmUmpQsNROguqVoY14kbCotBXrXCvx9eruH83e y92TFscRr0fzu3PyklQBLJZS4CYR9VYRPqPRR9uHsRK61gJ/fZjDWwz++l88wvoiklVa ouvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si12648159ild.162.2021.06.27.08.57.33; Sun, 27 Jun 2021 08:57:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230321AbhF0P5B (ORCPT + 99 others); Sun, 27 Jun 2021 11:57:01 -0400 Received: from smtp01.smtpout.orange.fr ([80.12.242.123]:57036 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbhF0P5A (ORCPT ); Sun, 27 Jun 2021 11:57:00 -0400 Received: from localhost.localdomain ([86.243.172.93]) by mwinf5d54 with ME id NFuY2500E21Fzsu03FuYhQ; Sun, 27 Jun 2021 17:54:33 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 27 Jun 2021 17:54:33 +0200 X-ME-IP: 86.243.172.93 From: Christophe JAILLET To: thierry.reding@gmail.com, jonathanh@nvidia.com, digetx@gmail.com, ulf.hansson@linaro.org, maz@kernel.org, gustavoars@kernel.org, jckuo@nvidia.com Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] soc/tegra: Fix an error handling path in 'tegra_powergate_power_up()' Date: Sun, 27 Jun 2021 17:54:31 +0200 Message-Id: <46d3af4a83e2e7b680c857e8969167f0d2d94841.1624809134.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If an error occurs after a successful 'tegra_powergate_enable_clocks()' call, it must be undone by a 'tegra_powergate_disable_clocks()' call, as already done in the below and above error handling paths of this function. Update the 'goto' to branch at the correct place of the error handling path. Fixes: a38045121bf4 ("soc/tegra: pmc: Add generic PM domain support") Signed-off-by: Christophe JAILLET --- /!\ This patch is speculative /!\ Review with care. --- drivers/soc/tegra/pmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index ea62f84d1c8b..b8ef9506f3de 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -782,7 +782,7 @@ static int tegra_powergate_power_up(struct tegra_powergate *pg, err = reset_control_deassert(pg->reset); if (err) - goto powergate_off; + goto disable_clks; usleep_range(10, 20); -- 2.30.2