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 F145725A33F for ; Fri, 20 Feb 2026 14:31:56 +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=1771597918; cv=none; b=JJOxQR/fyGDKF/qQq//zP5Z29iFFZAftq6UFlduTpSpL1qxam1LvhQGZREw2O5aVIo0xtq085nxR6whvit5ZF7BRcMamNflRRptzgGZLo8gacxzP9oUj2Uubx4pssaIn3fcP/6+XgZxDVneNy7D1kRTsZMM3/3VF9kdil6XE0jc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771597918; c=relaxed/simple; bh=8pFXxfm43Ygmt72K/mPB3H7PwfQ1tOuAOc+Hc2LxDfs=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=KaCs4rMEXe+4EwlZmuDRfxp8NjpTghS5HVzV6dTEBCcG0Y/450OxjNoOyw1wBgUIK4oCpq9wUQNuEkx1ds/j9h/X2xepjdVzpQjprv7vNo0oeNfFT8vp1LUN1j+Me5uCn/ZNFaJd2kpoHZ2xARQBvV0wpr74dViBEt8b2Eh3h6g= 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=Dh0ifrOe; 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="Dh0ifrOe" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 3E57C4E4087C; Fri, 20 Feb 2026 14:31:55 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 037975FA8F; Fri, 20 Feb 2026 14:31:55 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 84960102F19B0; Fri, 20 Feb 2026 15:31:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1771597913; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=rPpUH3pBdNAOPK5SiNx2Rrg92L+/rJ08JvvHmn303A4=; b=Dh0ifrOeeS41VcE9gU+++r5glsC6Fr1ruRyVc93NpfJv666XSEpdn2oOEQW/ftH5R8jXG5 nG8H62uMO8j8mJfbJ67z44jFzpm+qHLOLQqt5upwKsSdJi1RXAFh3he/kJqPf/xSTr2x+C nzVH1p87WhiH3pGmPePcq2JxJnufdU7+KUcmZ/5453o3d5g1rAAH4tayZ/ir77OoWcaHyF ThE2zF+QKucuQpTkcCCxTg1e3XN4njqU8agVMkPZ3BE3XahtTBcJjwmU5mHrlsLmYp4xQp LmNqe9KgxZei/zQ18whLY7akuFODp3l99hsV7t9qAs5A9kIwpAN0g11WlSKbEg== From: Luca Ceresoli To: Inki Dae , Jagan Teki , Marek Szyprowski , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Marek Vasut , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Osama Abdelkader Cc: stable@vger.kernel.org In-Reply-To: <20260209184115.10937-1-osama.abdelkader@gmail.com> References: <20260209184115.10937-1-osama.abdelkader@gmail.com> Subject: Re: [PATCH] drm/bridge: samsung-dsim: Fix memory leak in error path Message-Id: <177159790823.593042.10877987376431584853.b4-ty@bootlin.com> Date: Fri, 20 Feb 2026 15:31:48 +0100 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: 7bit X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 On Mon, 09 Feb 2026 19:41:14 +0100, Osama Abdelkader wrote: > In samsung_dsim_host_attach(), drm_bridge_add() is called to add the > bridge. However, if samsung_dsim_register_te_irq() or > pdata->host_ops->attach() fails afterwards, the function returns > without removing the bridge, causing a memory leak. > > Fix this by adding proper error handling with goto labels to ensure > drm_bridge_remove() is called in all error paths. Also ensure that > samsung_dsim_unregister_te_irq() is called if the attach operation > fails after the TE IRQ has been registered. > > [...] Applied, thanks! [1/1] drm/bridge: samsung-dsim: Fix memory leak in error path commit: 803ec1faf7c1823e6e3b1f2aaa81be18528c9436 Best regards, -- Luca Ceresoli