From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 D613B2949E0; Wed, 8 Jul 2026 16:02:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783526571; cv=none; b=L+KE9E233frF8ToEgNadY7JogxT2B/FFeh3/CsTcpRrmlcGDYEL7YHUj1np9CKPj4J3D9N/G7zb6Hl6j4zj3gSxtrBXD2a5WMm5UjrXyRbBzh2pjRRxnbN2amPpIl9skrhigDdQjKPi3NlH22YvNkKoH/JWn/gwoaFUE2CD+S1U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783526571; c=relaxed/simple; bh=9zzaZUv8KiEl1PkZH1yBjf1pc+o80nBplH7xffI0+Kk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CcrqDTOkgyXtYNOpaAMRRZ/C2PPHx47A1ZlGLcaGnnBZyET8C6WMrbk9R0inkEpEo+MPRO03sbQXE4Iz8M+xmej8C7GOKJZRfX1FQh1NYUjrfErzeBVOmwEskQEPgNouJpj+RGVSGOBBMcLbkPYkhLaJnHOHwCJcvg/bh+5C5kA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=ccMpnuuu; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ccMpnuuu" Received: from ideasonboard.com (93-46-82-201.ip106.fastwebnet.it [93.46.82.201]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 86739EAA; Wed, 8 Jul 2026 18:01:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1783526518; bh=9zzaZUv8KiEl1PkZH1yBjf1pc+o80nBplH7xffI0+Kk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ccMpnuuunoZ2qgyO4hgTkyUZNbkjthL01dQ9edwqXBdUF+ZWOT6hnVQIOQ/8hewzF sUxWeiDFsX4Ql+imN03HQDoUMF9kRDOvuYrKIIh9EZrDEzAetcoViVbtBikMCDl9w9 DcYIf0VkGBploIL/u0L2+CsfcxRVcz7laYAzGwlw= Date: Wed, 8 Jul 2026 18:02:45 +0200 From: Jacopo Mondi To: Biren Pandya Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, niklas.soderlund@ragnatech.se, mchehab@kernel.org, geert+renesas@glider.be, magnus.damm@gmail.com, laurent.pinchart@ideasonboard.com, jacopo.mondi@ideasonboard.com Subject: Re: [PATCH v3 4/4] media: renesas: rzg2l-core: Add missing media_entity_cleanup() Message-ID: References: <20260704174638.66302-6-birenpandya@gmail.com> <20260704174638.66302-10-birenpandya@gmail.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260704174638.66302-10-birenpandya@gmail.com> On Sat, Jul 04, 2026 at 11:16:43PM +0530, Biren Pandya wrote: > The remove function fails to call media_entity_cleanup() upon teardown. > > While currently a no-op in most cases, calling media_entity_cleanup() > is an API requirement for entities initialized with media_entity_pads_init() > to prevent memory leaks. > > Add the missing media_entity_cleanup() call in rzg2l_cru_remove(). Same comments as per the other patches > Signed-off-by: Biren Pandya > --- > drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c > index 3c5fbd857371..84d4883e2fe7 100644 > --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c > +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c While at it, you could consider patching the error path in rzg2l_cru_media_init() Thanks j > @@ -312,6 +312,7 @@ static void rzg2l_cru_remove(struct platform_device *pdev) > v4l2_async_nf_cleanup(&cru->notifier); > > rzg2l_cru_video_unregister(cru); > + media_entity_cleanup(&cru->vdev.entity); > media_device_cleanup(&cru->mdev); > mutex_destroy(&cru->mdev_lock); > > -- > 2.50.1 (Apple Git-155) > >