From nobody Mon Feb 9 19:37:40 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71670339872; Fri, 9 Jan 2026 10:03:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767953015; cv=none; b=qe1bVbSptDPwkOe6ota/wBEv4a2KdRftGmFZicA12kKRDXA1rjBv5OUuW43SZvbHHSngVLtiPCxY1Xfcc9N9PtdoA6huVudj8iXAgtxXHUzZQ5MOra9aaXq+aWgVL+Q5Wev8l8gMokJ0rDXf/U3+aO9SqnQX2ViIgILTmMoz5Do= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767953015; c=relaxed/simple; bh=tYPQSk3+RVozImxJ3ZhyeViwADjWKkDqW0MwWKrrNSM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZkFxPIhoYPmgAOEOByMlfQQ1pLQD60MsvOKOb9ouBw5hBeCM5W0N4oOphqLdLw8ounIQZpERei8gagxKp0qK8T2TpOqzECOl8bpFRnivo5WKcv/ofZLM/BDBxLmmeC0HhJvND1S4LyvMDNVgq0bxXdReGtgoaWlgucPR1ERpHS0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=0Y4aL+Wh; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="0Y4aL+Wh" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id E9617C1F6D3; Fri, 9 Jan 2026 10:03:05 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 33F5A60734; Fri, 9 Jan 2026 10:03:32 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 32C3E103C88A8; Fri, 9 Jan 2026 11:03:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1767953009; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=e7yKYTktaJ5QBYIv/riMau9mtMOQxGCnsiL5HskQuQs=; b=0Y4aL+WhrqX8pFZoSHXt+GHmfUVCLeSuTr+X3dQAvdxLYKoCo/T47xKtVtnl13bEHRzgER OiUc1Rxr0DZAN1DpP/MZ8T9yxTDShFSiU4WPVzdnZL7JRdZMto8U/SaRiuKcT/Zm2eY9Ig AYWB4UoLm+w/n+7PmJttTEbXGZmEeIN1D1WKUrOdGEXIKqgYrX/S7dIYT5PoCgKjwR24jH YQEUIK0pSwHRjiqSXEg5Uc/ybUUVKGaItruo4ogLPrNsGUlN3lRyC8UhJjUQJL0KSzk6OQ TJBwqIM+d/FQizQHv8ds7ex8LeiOIpHdOfpBgG1dsNQpYPq8UGexwV/I/4OC5Q== From: Luca Ceresoli Date: Fri, 09 Jan 2026 11:02:52 +0100 Subject: [PATCH v2 3/6] drm/imx/dw-hdmi: convert to of_drm_find_and_get_bridge() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260109-drm-bridge-alloc-getput-drm_of_find_bridge-3-v2-3-8d7a3dbacdf4@bootlin.com> References: <20260109-drm-bridge-alloc-getput-drm_of_find_bridge-3-v2-0-8d7a3dbacdf4@bootlin.com> In-Reply-To: <20260109-drm-bridge-alloc-getput-drm_of_find_bridge-3-v2-0-8d7a3dbacdf4@bootlin.com> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Philipp Zabel , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Chun-Kuang Hu , Matthias Brugger , AngeloGioacchino Del Regno , Inki Dae , Seung-Woo Kim , Kyungmin Park , Krzysztof Kozlowski , Alim Akhtar , Laurent Pinchart , Tomi Valkeinen , Kieran Bingham , Geert Uytterhoeven , Magnus Damm Cc: Marek Szyprowski , Hui Pu , Thomas Petazzoni , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Luca Ceresoli X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 of_drm_find_bridge() is deprecated. Move to its replacement of_drm_find_and_get_bridge() which gets a bridge reference, and ensure it is put when done. Signed-off-by: Luca Ceresoli Acked-by: Maxime Ripard Reviewed-by: Philipp Zabel --- Changes in v2: - add missing drm_bridge_put() on component_add() failure - reorder lines in dw_hdmi_imx_remove() --- drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c b/drivers/gpu/drm/imx/= ipuv3/dw_hdmi-imx.c index 07e5f96202d4..398f3cce5532 100644 --- a/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c +++ b/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c @@ -241,7 +241,7 @@ static int dw_hdmi_imx_probe(struct platform_device *pd= ev) if (IS_ERR(hdmi->hdmi)) return PTR_ERR(hdmi->hdmi); =20 - hdmi->bridge =3D of_drm_find_bridge(np); + hdmi->bridge =3D of_drm_find_and_get_bridge(np); if (!hdmi->bridge) { dev_err(hdmi->dev, "Unable to find bridge\n"); dw_hdmi_remove(hdmi->hdmi); @@ -249,8 +249,10 @@ static int dw_hdmi_imx_probe(struct platform_device *p= dev) } =20 ret =3D component_add(&pdev->dev, &dw_hdmi_imx_ops); - if (ret) + if (ret) { + drm_bridge_put(hdmi->bridge); dw_hdmi_remove(hdmi->hdmi); + } =20 return ret; } @@ -260,6 +262,7 @@ static void dw_hdmi_imx_remove(struct platform_device *= pdev) struct imx_hdmi *hdmi =3D platform_get_drvdata(pdev); =20 component_del(&pdev->dev, &dw_hdmi_imx_ops); + drm_bridge_put(hdmi->bridge); dw_hdmi_remove(hdmi->hdmi); } =20 --=20 2.52.0