From patchwork Fri Nov 26 16:18:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 12641109 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 755C9C433F5 for ; Fri, 26 Nov 2021 16:20:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D0306F966; Fri, 26 Nov 2021 16:20:18 +0000 (UTC) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id B9E786F900 for ; Fri, 26 Nov 2021 16:19:55 +0000 (UTC) Received: by mail-lf1-x133.google.com with SMTP id bi37so25488199lfb.5 for ; Fri, 26 Nov 2021 08:19:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J2ouOYArYTiGPyKjaLg9beinXsL+bwxgMLfVEklW094=; b=X6Qoj4ZhOaFBVDQNFBnNR3t7hp3vEEwXxbZern/ZQbYxgqUJYv4AScqsBuJ73e8Iby b6E0g8zTh8Ng/vTEY3BcjX16mLYX382sMlU9jXdUYddolleHq7Xju1SpglbeiuhvA9ec YuZLhkDakLWze9cNl+YPU/YT1VzdtplEB2NEecWCDsIYOxqpDO2ha7KDmSIcqIAJXUZp OhOaJr1GcLXGkqwtQVVaCapj+6ctuujv2PmNvSXgoPxH2/bpqFnV4sapVVWlOLXy9URc tvfjGlP59XQiI5qHUcO12udjNLUkgbj3u/sElqUWZ2aOK3TJPibHLClSyKI+Ge6ZeyCS n1Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J2ouOYArYTiGPyKjaLg9beinXsL+bwxgMLfVEklW094=; b=GQVExhayHYockmClua30bhsAX6pt2kovFc4jfM4dRuoj80r8TzbRBBuXIzjnDaU3WT lXCsS4bclcomZivlwzgpLbhv5QTxqwOvpBmv6MWd6IV+td1n0ma9qB0M5Q/ZHD/x/E7f tLrISgbqh1nc9T8Vbq7knm1555vQr6Kk/hHs+KKpoXMPjiqd3PBSjrxOOiimu5wsfyUz HDfEDQpEb8zjgcKGg3GFktN+3+TtWEK+dPoRt2o9y/UVNxgCN8KaeJsOEFhRhvynNqp9 xAL2VVutmay5eSgMsIKy9UXmpoZujMD+ICQdDfv61+JHlFML0GkaoOguWPSaRrrAr1TG mjPw== X-Gm-Message-State: AOAM532NLuFawMeYDrNBwVTN1cL9gw/x706DnX+/kytKH/xyGjfK/ywe fnOzAQ9f8oobrT3dI5wBQZs= X-Google-Smtp-Source: ABdhPJx1S5VSCeVt+lhrxJEnN4E3jZNeyvTZuhJ0KfH/4BlVMHy6qUL8X955jzS+e6Uo1LAS9fS4Qw== X-Received: by 2002:a05:6512:1296:: with SMTP id u22mr30661465lfs.296.1637943594114; Fri, 26 Nov 2021 08:19:54 -0800 (PST) Received: from localhost.localdomain (94-29-48-99.dynamic.spd-mgts.ru. [94.29.48.99]) by smtp.gmail.com with ESMTPSA id t7sm613381lfl.260.2021.11.26.08.19.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 08:19:53 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Liam Girdwood , Agneli , Rob Herring Subject: [PATCH v2 14/20] drm/tegra: hdmi: Unwind tegra_hdmi_init() errors Date: Fri, 26 Nov 2021 19:18:01 +0300 Message-Id: <20211126161807.15776-15-digetx@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211126161807.15776-1-digetx@gmail.com> References: <20211126161807.15776-1-digetx@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Arnd Bergmann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add missing error unwinding to tegra_hdmi_init(), for consistency. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/hdmi.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index 9a87d351a828..142ad696426f 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -1456,22 +1456,31 @@ static int tegra_hdmi_init(struct host1x_client *client) if (err < 0) { dev_err(client->dev, "failed to enable HDMI regulator: %d\n", err); - return err; + goto output_exit; } err = regulator_enable(hdmi->pll); if (err < 0) { dev_err(hdmi->dev, "failed to enable PLL regulator: %d\n", err); - return err; + goto disable_hdmi; } err = regulator_enable(hdmi->vdd); if (err < 0) { dev_err(hdmi->dev, "failed to enable VDD regulator: %d\n", err); - return err; + goto disable_pll; } return 0; + +disable_pll: + regulator_disable(hdmi->pll); +disable_hdmi: + regulator_disable(hdmi->hdmi); +output_exit: + tegra_output_exit(&hdmi->output); + + return err; } static int tegra_hdmi_exit(struct host1x_client *client)