From patchwork Mon Nov 27 15:41:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 119734 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp438524qgn; Mon, 27 Nov 2017 07:42:47 -0800 (PST) X-Google-Smtp-Source: AGs4zMaTLtt2SS5jRmWOD6JFZ3wloRG5jhznTIVHkP7dHHCgYpXx8Lx6moEy7+tQooW1VJsIzQad X-Received: by 10.159.216.131 with SMTP id s3mr38361748plp.432.1511797367630; Mon, 27 Nov 2017 07:42:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511797367; cv=none; d=google.com; s=arc-20160816; b=XYPcqqlCJtCefOKQiQHh/JwxlGAzdkWOvlAIZE4fAljIom5+PsUOJhzRmklnV22mAD no4BSSGhfEmU0RbUlrX62cZ+Gr5bbsOolmqYSBJ3f1Hnw9jE2aaNO83MzScqkzlb4NW9 Jn27QTOoXKidfa3PVmkDAemEHdANQ4d8APUedFYhJ9g6tWtU7J5+bTTrVRESa3w8bP/a gIlITsBRCHQ4gXiAbmyfzdNl5gDLrIX2577j7mOR8LZrfqQrBLbt/6duEEsH4++Mc0iZ w4uMDcPOMOU+v8kj6QwnoOtheqrRdgO7Ccj0IyOF5DHPjL3oiqvttYJ7vqVUT6LMXGYO iG5g== 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=t8kvVDRnloM+26UJc2D+kTDItOkkfrluYiaMxxFGHv0=; b=xwfYfAG5tAgCq71Jua98JKBez9xzjpZ1g4ToLaVdyKsOK19A8rmneGEvxZgxQ7H/F+ OOVDAtmpoj2/Ip/SaIX0eZApwFnUxi/XfhfJ0ysJWqCKS/Ujs+vqiIkMZ2jaEArdkhw+ wNYPxqVDRbFx+oBgjcJRyQ2MB4ubhRurnQy/ljZ5aEA1BAkHek+28t2Tjb5W1kYKcOeP KLTfDW2Q1sWdYDrsgYB8DXpCosWQWghIfpQN6mbnF4AfJ64SUd/r1t3hTINcKQLrYART unSfWU0rhFY1xkij2CXORPvKxQtAzkhys26uIfVmDstPuXjqezVGHIvl25CoaJWyv/IR CmdA== 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 z18si23429499pge.375.2017.11.27.07.42.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Nov 2017 07:42:47 -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 3B4526E319; Mon, 27 Nov 2017 15:42:08 +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 AD31C6E305 for ; Mon, 27 Nov 2017 15:42:02 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 91FA8213EC; Mon, 27 Nov 2017 16:42:01 +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, URIBL_BLOCKED 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 60B57213E2; Mon, 27 Nov 2017 16:42:01 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v2 04/18] drm/sun4i: Fix error path handling Date: Mon, 27 Nov 2017 16:41:28 +0100 Message-Id: <9dcb9aab9969c28dd32f8c3599091e3c4c4682ca.1511797218.git-series.maxime.ripard@free-electrons.com> 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, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , stable@vger.kernel.org, linux-clk@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") 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 e122f5b2a395..f4284b51bdca 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) { /*