From patchwork Thu Dec 7 15:58:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 121010 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8535215qgn; Thu, 7 Dec 2017 08:00:50 -0800 (PST) X-Google-Smtp-Source: AGs4zMYfvnrAupV5uA0wKg7q1V4MNx7SU3jAU92lHxnLA4jaMKTP2QpXwjX+867HBSIbPnpTlVSF X-Received: by 10.84.252.139 with SMTP id y11mr2533677pll.389.1512662450627; Thu, 07 Dec 2017 08:00:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512662450; cv=none; d=google.com; s=arc-20160816; b=1JGkkXOkuBR0mWH3e0Kmd42NSRmW4RqzMe7fpkdp5kPe4PRluyvQuxIEwwTmCyec8n 0HaovPZUOO0Z+/USdrBWAwbFKyNyUWr8pgHGX/pHfCJhBChYWw3GiUXCOyRAggU0ulLO 2nkow/73nwXipTKi6trx+DBsjQLZEa3dWigZNWb83LbuadJDP6uVFh4Wxj00zO0WV2kF xX8LgeMD15Mieyy4tPdg/khd+Wj+wCrthELnRUlq33I7OM+Y9h4nCqhBEfz8b/3mN7y9 L5Rp02dAnN0XPOOaDEiKJVGCU8+Gy6oHnxRy0DM53iBKIhFFnYxYMsu+9gM59jNRnuH0 vzpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:references:in-reply-to:references:in-reply-to :message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=XYDYiB/95pFcxzgfxrSM6bKohU2sMy84SDefx+3s0vk=; b=bmQXhsTGQGtyUsec8op9tg01S9m269MOQgdv2SlFBNXsJaUMRci9n3iG86vQqEpCND XItIDqSodPgQn13tMrBxAkWPJ0iX7xz+yFikdVQPTF60oX8MjCjOohKuHh9b7WsMI4Cp Et7ReeNi6LRzRj4oVvDOfCP4/FYV8b49xAWhY1DfTNzBnh7xXhhx9rep2oi/ydBwMhVY cm5RJjvc8ZvBTpouw1GXqo9bpkWfJEDrE8YU7UJQ1ZR6lluSa+ufNH6MI/uJzzKTieyK 4r7+wJ2AR1+lOc/aahtI6FCqW2Rc90siF3g6lQTON8BqsUvpE3ay0VdveCpB6P1C7SCe oSAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id x5si3907582pge.830.2017.12.07.08.00.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 08:00:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 981846E848; Thu, 7 Dec 2017 15:59:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 607316E83D for ; Thu, 7 Dec 2017 15:59:28 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 2898720E57; Thu, 7 Dec 2017 16:59:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [185.94.189.187]) by mail.free-electrons.com (Postfix) with ESMTPSA id D831820D84; Thu, 7 Dec 2017 16:59:16 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v4 05/15] drm/sun4i: Fix error path handling Date: Thu, 7 Dec 2017 16:58:50 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Mark Rutland , Thomas Petazzoni , jernej.skrabec@siol.net, plaes@plaes.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , thierry.reding@gmail.com, stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org, icenowy@aosc.io X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The commit 4c7f16d14a33 ("drm/sun4i: Fix TCON clock and regmap initialization sequence") moved a bunch of logic around, but forgot to update the gotos after the introduction of the err_free_dotclock label. It means that if we fail later that the one introduced in that commit, we'll just to the old label which isn't free the clock we created. This will result in a breakage as soon as someone tries to do something with that clock, since its resources will have been long reclaimed. Cc: Fixes: 4c7f16d14a33 ("drm/sun4i: Fix TCON clock and regmap initialization sequence") Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index a1ed462c2430..ea056a3d2131 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -724,12 +724,12 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master, if (IS_ERR(tcon->crtc)) { dev_err(dev, "Couldn't create our CRTC\n"); ret = PTR_ERR(tcon->crtc); - goto err_free_clocks; + goto err_free_dotclock; } ret = sun4i_rgb_init(drm, tcon); if (ret < 0) - goto err_free_clocks; + goto err_free_dotclock; if (tcon->quirks->needs_de_be_mux) { /*