From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7B96C433FE for ; Wed, 24 Nov 2021 13:07:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344616AbhKXNKa (ORCPT ); Wed, 24 Nov 2021 08:10:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:49338 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344678AbhKXNJV (ORCPT ); Wed, 24 Nov 2021 08:09:21 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9479261A63; Wed, 24 Nov 2021 12:40:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637757640; bh=n41eNGM86BcjQd4eM7Z6NGpYXo6Css2k/s/x64od6FQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N/sowpOHdCke5LILSpgvABnIcbsaw3EbkVkLPZW3iHUYRnqMpr9F3K5827eE/tBHZ txf9k9/VIZEUyp0Izk92SnZgxXCKQkgnPWwDtkbD/pf+0mwGdgNEknsRV8z47aVZoy A16UO3KtBrWrgtMM+eHcwZVMZJemVqgw/g9FnFHQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Jon Hunter , Thierry Reding , Sasha Levin Subject: [PATCH 4.19 186/323] soc/tegra: Fix an error handling path in tegra_powergate_power_up() Date: Wed, 24 Nov 2021 12:56:16 +0100 Message-Id: <20211124115725.222867479@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115718.822024889@linuxfoundation.org> References: <20211124115718.822024889@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Christophe JAILLET [ Upstream commit 986b5094708e508baa452a23ffe809870934a7df ] 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 Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin --- 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 f17a678154047..6c57e43787cbf 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -408,7 +408,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.33.0