lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 30 Dec 2021 06:23:04 +0200
From:   Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:     Pratyush Yadav <p.yadav@...com>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Nikhil Devshatwar <nikhil.nd@...com>,
        Tomi Valkeinen <tomi.valkeinen@...asonboard.com>,
        Vignesh Raghavendra <vigneshr@...com>,
        Benoit Parrot <bparrot@...com>,
        Maxime Ripard <mripard@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Niklas Söderlund 
        <niklas.soderlund+renesas@...natech.se>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-media@...r.kernel.org
Subject: Re: [PATCH v5 02/14] media: cadence: csi2rx: Cleanup media entity
 properly

Hi Pratyush,

Thank you for the patch.

On Fri, Dec 24, 2021 at 12:46:03AM +0530, Pratyush Yadav wrote:
> Call media_entity_cleanup() in probe error path and remove to make sure
> the media entity is cleaned up properly.
> 
> Suggested-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> Signed-off-by: Pratyush Yadav <p.yadav@...com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>

> ---
> 
> Changes in v5:
> - New in v5.
> 
>  drivers/media/platform/cadence/cdns-csi2rx.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c
> index 2a23da6a0b8e..2547903f2e8e 100644
> --- a/drivers/media/platform/cadence/cdns-csi2rx.c
> +++ b/drivers/media/platform/cadence/cdns-csi2rx.c
> @@ -471,6 +471,7 @@ static int csi2rx_probe(struct platform_device *pdev)
>  err_cleanup:
>  	v4l2_async_nf_unregister(&csi2rx->notifier);
>  	v4l2_async_nf_cleanup(&csi2rx->notifier);
> +	media_entity_cleanup(&csi2rx->subdev.entity);
>  err_free_priv:
>  	kfree(csi2rx);
>  	return ret;
> @@ -483,6 +484,7 @@ static int csi2rx_remove(struct platform_device *pdev)
>  	v4l2_async_nf_unregister(&csi2rx->notifier);
>  	v4l2_async_nf_cleanup(&csi2rx->notifier);
>  	v4l2_async_unregister_subdev(&csi2rx->subdev);
> +	media_entity_cleanup(&csi2rx->subdev.entity);
>  	kfree(csi2rx);
>  
>  	return 0;

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ