From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 444303FF1D5; Fri, 15 May 2026 15:53:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778860428; cv=none; b=os4zWsaKPmNEYpweH9SA8/UsPMdh4xl5KolJAM0KUvcIboT7hKqezLec182tupOfXeJYfCCXGhmp+n1FeiQBkbCM9wwp03cMKev0z2hxV0Rzk4EzVDksuLWrMrhqSL1a3If2GNIv3cqamA0kaFBPGN8LEXMnNAWVB2Dfgy5mLjI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778860428; c=relaxed/simple; bh=MHmmB775ZD7Up95Osp2mCXk0+wO09Eo9NauazZny4ag=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bxJEx/I9vD1SvmOf542L8Z9EuslWZL726zUsExqohAs3tWRumfQH27q+PXktYLiXome5jEstWEWlDyiWPEgMjw7Aqz2+rvMA8bkHLylzMux9tO73j57mmwO5FwzhnF2fjl7np+pO/mtI8Otdo9jCryRTqNu1eKh4V3uy12b5N4s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eEe1O8yp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eEe1O8yp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE089C2BCB0; Fri, 15 May 2026 15:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778860428; bh=MHmmB775ZD7Up95Osp2mCXk0+wO09Eo9NauazZny4ag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eEe1O8yp+FihTVLB5Z4yLTqxZPnThUoSMPpPPUzVhSg+X62e2kikY7frk1oq2g7GG R37jHG7IlDCjbXyPnVFOKeJscu2Dzq38CCTU/dN/wcP6HG5rbYQH6aj3rKny5Grbi0 FDZxV5F1skqcyJHTr2eLs4O1JT2/TEuQQttVxC4Q= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Osama Abdelkader , =?UTF-8?q?Rapha=C3=ABl=20Gallais-Pou?= , Luca Ceresoli Subject: [PATCH 6.12 085/144] drm/exynos: remove bridge when component_add fails Date: Fri, 15 May 2026 17:48:31 +0200 Message-ID: <20260515154655.493588435@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260515154653.469907118@linuxfoundation.org> References: <20260515154653.469907118@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Osama Abdelkader commit 26f6654a9a60eb4d241f42a0ec85412e8821480b upstream. Use devm_drm_bridge_add() so the bridge is released if probe fails after registration, and drop the manual drm_bridge_remove() in remove(). Check the return value of devm_drm_bridge_add(). Signed-off-by: Osama Abdelkader Fixes: 576d72fbfb45 ("drm/exynos: mic: add a bridge at probe") Cc: stable@vger.kernel.org Reviewed-by: Raphaƫl Gallais-Pou Reviewed-by: Luca Ceresoli Link: https://patch.msgid.link/20260423200622.325076-2-osama.abdelkader@gmail.com Signed-off-by: Luca Ceresoli Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c @@ -424,7 +424,9 @@ static int exynos_mic_probe(struct platf mic->bridge.funcs = &mic_bridge_funcs; mic->bridge.of_node = dev->of_node; - drm_bridge_add(&mic->bridge); + ret = devm_drm_bridge_add(dev, &mic->bridge); + if (ret) + goto err; pm_runtime_enable(dev); @@ -444,12 +446,8 @@ err: static void exynos_mic_remove(struct platform_device *pdev) { - struct exynos_mic *mic = platform_get_drvdata(pdev); - component_del(&pdev->dev, &exynos_mic_component_ops); pm_runtime_disable(&pdev->dev); - - drm_bridge_remove(&mic->bridge); } static const struct of_device_id exynos_mic_of_match[] = {