From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3210BCD3427 for ; Tue, 5 May 2026 15:37:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F0DC10EB52; Tue, 5 May 2026 15:37:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.b="MUGBWgbz"; dkim-atps=neutral Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by gabe.freedesktop.org (Postfix) with ESMTPS id E3C8610EB52 for ; Tue, 5 May 2026 15:37:53 +0000 (UTC) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 3EF724E42BB4; Tue, 5 May 2026 15:37:52 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 0F80B6053C; Tue, 5 May 2026 15:37:52 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id AAF4E11AD022F; Tue, 5 May 2026 17:37:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1777995471; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=HZmLA+Ej807XLHgfevQTbDYX5T8/bO5w2qryqZwTK88=; b=MUGBWgbzvubrNlMlIq554ytIMiO1qucps4MH4Mkk9B4b2BeeQhHaJ6e66akXUQgGozfyz5 1Wg8RfSAM715trTjptDPGDDhG1p5FEp3Hh6whmNnwOIcKbWaRcg/a0l9Ax9RFUwDJptzut Mm0Dxxx8LaYFQHrgmzCn3XbCkjtQfd4aLWjg1LfpsHYQldMN242ADBh64WAFRV4bPXy2dd fAu82mal1ZTtrHcZTrA2EAFelMWIPtI3RJhaLlyzmDtIvDz1LNIPIMD1hKN8OGg16os2G3 V8wNYHLVa7/Up28SJV/H6qVupM9yTfKtG3w+dnei3WXM6IlMRmYLLPY63LEwNQ== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 05 May 2026 17:37:42 +0200 Message-Id: From: "Luca Ceresoli" Subject: Re: [PATCH v4 3/3] drm/bridge: megachips: remove bridge when irq request fails Cc: To: "Osama Abdelkader" , "Peter Senna Tschudin" , "Ian Ray" , "Martyn Welch" , "Andrzej Hajda" , "Neil Armstrong" , "Robert Foss" , "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Archit Taneja" , , X-Mailer: aerc 0.20.1 References: <20260430195700.80317-1-osama.abdelkader@gmail.com> In-Reply-To: <20260430195700.80317-1-osama.abdelkader@gmail.com> X-Last-TLS-Session-Version: TLSv1.3 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu Apr 30, 2026 at 9:56 PM CEST, Osama Abdelkader wrote: > If devm_request_threaded_irq() fails after drm_bridge_add(), remove the > bridge before returning. > > Keep drm_bridge_add() rather than devm_drm_bridge_add(): registration is > tied to the STDP4028 device while ge_b850v3_register() may complete from > either I2C probe; devm would not unwind the bridge if the other client's > probe fails. I had a hard time in getting what you mean, until I noticed the global (ugh) ge_b850v3_lvds_ptr and the two "Only register after both bridges are probed" checks. Pretty hacky, but definitely for the sake of the fix you're introducing your patch will be OK. > Signed-off-by: Osama Abdelkader > Fixes: fcfa0ddc18ed ("drm/bridge: Drivers for megachips-stdpxxxx-ge-b850v= 3-fw (LVDS-DP++)") > Cc: stable@vger.kernel.org Reviewed-by: Luca Ceresoli -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com