From patchwork Tue Dec 5 15:10:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 120678 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5865092qgn; Tue, 5 Dec 2017 07:11:26 -0800 (PST) X-Google-Smtp-Source: AGs4zMZUUVpLU803zLN1X1cVS4XXrqMqM7AVWQKpYCYrMvEhiKiEQ605MAfJC0QMFPII+QHrUer4 X-Received: by 10.159.194.203 with SMTP id u11mr8626319plz.271.1512486686528; Tue, 05 Dec 2017 07:11:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512486686; cv=none; d=google.com; s=arc-20160816; b=Rz/VpH5D9euu3nQwdpzWCnoY+QqjMhVR2r1VSN+aOmEH5lnKt0//jW5vz1oDOQzTa+ IBE/lq7e1cEkQuLD5uthrsjiiIPJkcC4b1pnQQhdpVMRCoQDiJvrLdbpREC5y7QAqgxh WRjF6i4GPu2ZBucbDYC7rmpy/2yQrBbdpLohYKMx/hvZaEiTscx9Se3oY1qx1xgX/pkr X/y2ilZ0TXEVFPAw2IqnqwlMz0Pn3dhUnSJi2QFsXkgv7LrE190PHcg6z3jdX8sNZ69s BtNRX9D14WStcs0zNqA/Z+wKSu3wJmdMeA3FUPToXEP3bDByXPpVF0jR0VeCEeMlgLWq JJYQ== 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=VhPCQEequ3gdrnon38U1McQsMPjxhgBrfnJK00tOV3c=; b=03K4Fx2FN6eNIeAzMU7sMPleb90rMmMERUkudwCefFkUT7h6YMNjQiSJZlPExDsexr hTbm4LelapySsiFEwYLyWymSGc3CBi2fTsjleg5rbYejPDoc/6oETJ2U93hH6AI7aQo8 COEcSSLM3DAZ9Rn/fw9FVdZnJrpFqG9bWta2K08xrsSCzVuhSjOXdw12ehdTZUbXkRcg hxqr4HMGDhq96qwG/gMChg/wuShr+weKM2pcdnggt+BlBW1RenBg3Cy66giZ5p+hMWme /xg4by3XV2KFJyQlGvt3TUlYKBQIlfyJBEY07DNIyrkgDCzeEJAMbqWYPrWaeecLXuza WCog== 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 q29si186949pgc.795.2017.12.05.07.11.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 07:11:26 -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 8B69A6E591; Tue, 5 Dec 2017 15:10:44 +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 14E776E0FF for ; Tue, 5 Dec 2017 15:10:40 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 2C04420758; Tue, 5 Dec 2017 16:10:39 +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 (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id F13C8203A2; Tue, 5 Dec 2017 16:10:38 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v3 05/15] drm/sun4i: Fix error path handling Date: Tue, 5 Dec 2017 16:10:17 +0100 Message-Id: <1f2443c41082fc6e086570da38d20744c52fe636.1512486553.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, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , 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") Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai --- 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) { /*