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 2FF4AC433EF for ; Wed, 24 Nov 2021 12:39:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245382AbhKXMmK (ORCPT ); Wed, 24 Nov 2021 07:42:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:41628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344980AbhKXMjD (ORCPT ); Wed, 24 Nov 2021 07:39:03 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E020461212; Wed, 24 Nov 2021 12:23:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637756617; bh=DyAKIWdh3KkKonrXZGiTFMzbz3w5jP2mRpCujbRq4Ew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZI0rdh1SVQMgT5PA3zBRyaZRcwEMH/Rv7zHhHr0mWikqzc7IebUNeZye7wm/bo4fh kA1V/X1M+gfK4ACgk4WlIUFAgPg94JvUOlMrzM6QmRBM4mmIt3aEzyfc+YfQRiHJOK 8vld0REN7MX3JebrTy9nr22UpiyyNQQ7pwHc4cEg= 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.14 147/251] soc/tegra: Fix an error handling path in tegra_powergate_power_up() Date: Wed, 24 Nov 2021 12:56:29 +0100 Message-Id: <20211124115715.374734924@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115710.214900256@linuxfoundation.org> References: <20211124115710.214900256@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: linux-kernel@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 2422ed56895af..71f4ff3e13b46 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -407,7 +407,7 @@ static int tegra_powergate_power_up(struct tegra_powergate *pg, err = tegra_powergate_reset_deassert(pg); if (err) - goto powergate_off; + goto disable_clks; usleep_range(10, 20); -- 2.33.0