Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2338198lqo; Mon, 20 May 2024 02:41:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2EnjiAo0xYvT0KHa94Jq9ENRahHLcgfbVbnRpbh0bCLNqifPqp+diTmlO+cF4rvLNjYdUhSpIkl2MUnAXlmI1QyB+X1vt1T3wMTluOQ== X-Google-Smtp-Source: AGHT+IHsAyZ04+QunnveO7sdq4+Y2tN9IAeAidOheq7Ad2A9m8GKGnaeaNAGUp0NKev0X5D9UhMO X-Received: by 2002:a50:f605:0:b0:56b:ec47:a846 with SMTP id 4fb4d7f45d1cf-5734d5ceb43mr18042297a12.25.1716198071999; Mon, 20 May 2024 02:41:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716198071; cv=pass; d=google.com; s=arc-20160816; b=X9VYNlGYOvS8P1mJYUfUzuQuZfOUlXP+8bZsOuChScOlgjH5ZJcylLp0GEj4Q+PgRQ 9AeIMv9m7n7nkKFHUAanH8aCpTpbnvAhyHTO7ndkBo3oSXgLAoQfkqrArWUJwJPO1LeT Tew+fNvUj7DH8qIqdwEu5+FQIPZ60uLutfgrEsdIZsvPw2TCmWwj4BSSNit0D8D7n8M0 HIFmDpRP4/5EvvDng864VUW1i8+JU1JFyiJkcbEJli0hqpvUoQIzvKRu5dh6tJIy03cN I8JTObinNNVpZl2RVsKL/7F+L5Fmo5vywluFxadQ1GlTwvaKyeAvP6gAffl8G2lSWFir orCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=3kjknBbjqfJQ6eLw8k3gflhIVcgh33eEwLFPSws9YCE=; fh=adxxNRgQcLmwJu7OLgMHxQ4oF7a79+CwMXSqfp1eiiY=; b=W3CzuZFYwO5iDyHtkqpvS/g0T+SIaO+wpGnlF50TiRMbgw+XKwYa+i3jtn9I8shQzX aAYDlO/Z1zdHd9ZCtCMOuKONwqQx/rEjmXa/tzFUBRQai7tvP93BtOU/foxp0ZudIqZH OsxUTlPIyiA7Gab4nozo3+CtjU0wj81IOYTseacV5+lSDbjWa8Epzr+OHlqwA4nIN8tN v1L5DZ/Cjvb7ETLrwEHJHGOIhrZhWOHPP6gmDD2RALOw8/uQV56x356OQLe3GuZRunEx cKisgPdcVJeQasHFfM0rsIS2PPZRno9ppThh0tXlTflsFHs6TjJuNY5h4+B8j/goapNB eafg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=L+2yBEhh; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-183553-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183553-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c36d55csi13143366a12.518.2024.05.20.02.41.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 02:41:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183553-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=L+2yBEhh; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-183553-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183553-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B0A621F22051 for ; Mon, 20 May 2024 09:41:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F43022EF0; Mon, 20 May 2024 09:41:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="L+2yBEhh" Received: from msa.smtpout.orange.fr (smtp-70.smtpout.orange.fr [80.12.242.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91714320E; Mon, 20 May 2024 09:41:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716198063; cv=none; b=eCSlYo/F3zdV7PvEHsSIMYBqR7RX7Nr6xS7ZfQjGl29J2kVa1AfCI5tJHUf8GKwFEe3yh4aNHTtOcT4HgXt+LdDiPnB7DDS7FQGURDC16wuP3Y6ArvTCpEsiU7tz8pTIgK7Wrk3B/xsQEoKNXPhyrobVwh91HbW8SiDxHWN2ShI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716198063; c=relaxed/simple; bh=nVF0WvM42TTEecOP0ATh7bXHJ+8LpyzwZuXYehCdffM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dUXM3of07wCtXoqqEIH7piH1cSdwhYfCKvLewhcvv+Jfdsr9swmkofQ+1MxNsAFaz0z3HPsEfroL03fkV/L/BizJX7hix44OS7M8RxTtxLv+kkafGL92mVuVgBU5uSdnXISotyMhJJpOBNcf56LaP+n6D0Y+KLtHNKG0fZuEKcw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=L+2yBEhh; arc=none smtp.client-ip=80.12.242.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Received: from localhost.localdomain ([86.243.17.157]) by smtp.orange.fr with ESMTPA id 8zVgsQHohrcIM8zVgsAdfk; Mon, 20 May 2024 11:40:53 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1716198053; bh=3kjknBbjqfJQ6eLw8k3gflhIVcgh33eEwLFPSws9YCE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=L+2yBEhhgXi5xu2+LX9rSSwCMEbjT5QHl4m86H69IUBp1fMCGwNDcI+Uk5cNUKJwO B5A0GHGgSK3/XSJWXi1qZ+pCVqUX4832Ujg5925ZFmBOsmXN8l5PNZ6/f1C8YjOFrB ZJ/Q6dJ5aa6zqvnYVCJH/VvJnnclhbgGMuv3uSVpUgE5jX6i3Zah9nfranCk+lXFDM msfF8qGUAEfd6fTYV3OLoDLqRyRf8yiY+n6b62yr4VutEUjhw8Yv6qGqbEmCh+3XOo jLgNLXk+QFwblsvPg6jKAIvZKRFLOS0mjQCjeOkwAtE1hmy2EEhkmaq7zDJpXLCgLb EDrvMFjLxmxlQ== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 20 May 2024 11:40:53 +0200 X-ME-IP: 86.243.17.157 From: Christophe JAILLET To: Laurent Pinchart , Tomi Valkeinen , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Michal Simek , Sean Anderson Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] drm: zynqmp_dpsub: Fix an error handling path in zynqmp_dpsub_probe() Date: Mon, 20 May 2024 11:40:37 +0200 Message-ID: <974d1b062d7c61ee6db00d16fa7c69aa1218ee02.1716198025.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit If zynqmp_dpsub_drm_init() fails, we must undo the previous drm_bridge_add() call. Fixes: be3f3042391d ("drm: zynqmp_dpsub: Always register bridge") Signed-off-by: Christophe JAILLET --- Compile tested only --- drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c index face8d6b2a6f..f5781939de9c 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c @@ -269,6 +269,7 @@ static int zynqmp_dpsub_probe(struct platform_device *pdev) return 0; err_disp: + drm_bridge_remove(dpsub->bridge); zynqmp_disp_remove(dpsub); err_dp: zynqmp_dp_remove(dpsub); -- 2.45.1