From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 5B2C735E95A for ; Tue, 14 Apr 2026 07:33:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776151995; cv=none; b=QaV43noDST6v6EBi7i0qLnnyd+AipiQi56JBBgCGry+lUDkErwCz0y8Io+oEodtIzEnQyxHVC9fJ3Gw6ZK5tgO0zAhkvhidKGOaDoYBZQ9L3PHc48kDCv7eK2LNTl72I0hWRt/e3bfMN/iuYZ+yJPlaHbrjxQBhPQeKnlfSkkzM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776151995; c=relaxed/simple; bh=+jhoBxatsaAjC6FWptfSiIMZfdbuvMFutfKebmIeowg=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:To:From: References:In-Reply-To; b=B2lsDLNZhwpl2n83mDW/plVlBzz8vA3RpIirL264gtm80DbOZiID6CpC3+bCYL8E7Mj6UTfwAAhQVamhbM8rsrZyGD3pvTkWaTWPL0jk+V38NOYKXR9JObF53TiWglulhTrXiM1nxVBKbCu60mu1w1djzs7rplHaXe658Hj+pOo= 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=qeg300j2; arc=none smtp.client-ip=185.246.85.4 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="qeg300j2" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id DE55B4E429F3; Tue, 14 Apr 2026 07:33:11 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id B5D715FFBB; Tue, 14 Apr 2026 07:33:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 84C791045009A; Tue, 14 Apr 2026 09:33:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1776151990; h=from:subject:date:message-id:to:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=PjP986RvOAOPjOhP6DlRfE+VYZcwr8ScV33B3p29H38=; b=qeg300j2iwDsArj0vAC0Jyse4C4yYDkwji7W2EGklN0XIkktI6JfIeDMZGTmLEIFfxoXLb HpUXk+cwVwto6oFBN3CqCFFRAjVAMWyuqqOyT9qv6fg2xKqgVjMBscBqMLxCcoTBU59kks tih2XbdLN9p2yu8M31ILY3xVuJ82oKtn0+X1/SiD7qYdmCkk6w44Cxz8T9JG/pHm+NAqG1 R92Q+9hybdZLZRtSAGehTU38HTfl25rgTnT7Le9bYIbvv44coYuQ3hQ3gMC1g6gHZJePZW ouIpZ2SAs7ZvptdET0UTfiaNHJ+FSPYh/9tkSwsPm3vqGJxFJU46UNAQ/TWYfA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 14 Apr 2026 09:33:07 +0200 Message-Id: Subject: Re: [PATCH 1/3] drm/sti: remove bridge when sti_hda component_add fails To: "Osama Abdelkader" , "Alain Volmat" , "Raphael Gallais-Pou" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , , From: "Luca Ceresoli" X-Mailer: aerc 0.20.1 References: <20260410212801.413827-2-osama.abdelkader@gmail.com> In-Reply-To: <20260410212801.413827-2-osama.abdelkader@gmail.com> X-Last-TLS-Session-Version: TLSv1.3 On Fri Apr 10, 2026 at 11:27 PM CEST, Osama Abdelkader wrote: > when component_add fails in sti_hda_probe remove drm > bridge before return > > Signed-off-by: Osama Abdelkader > --- > drivers/gpu/drm/sti/sti_hda.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.= c > index b7397827889c..1b4ba9097005 100644 > --- a/drivers/gpu/drm/sti/sti_hda.c > +++ b/drivers/gpu/drm/sti/sti_hda.c > @@ -741,6 +741,7 @@ static int sti_hda_probe(struct platform_device *pdev= ) > struct device *dev =3D &pdev->dev; > struct sti_hda *hda; > struct resource *res; > + int ret; > > DRM_INFO("%s\n", __func__); > > @@ -783,7 +784,10 @@ static int sti_hda_probe(struct platform_device *pde= v) > > platform_set_drvdata(pdev, hda); > > - return component_add(&pdev->dev, &sti_hda_ops); > + ret =3D component_add(&pdev->dev, &sti_hda_ops); > + if (ret) > + drm_bridge_remove(&hda->bridge); > + return ret; > } At a quick look it seems that you can simply use devm_drm_bridge_add() in all the three drivers in this series. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com