[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220919143227.GC3958@tom-ThinkPad-T14s-Gen-2i>
Date: Mon, 19 Sep 2022 16:32:27 +0200
From: Tommaso Merciai <tommaso.merciai@...rulasolutions.com>
To: Rafael Mendonca <rafaelmendsr@...il.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Paul Kocialkowski <paul.kocialkowski@...tlin.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: i2c: ov5648: Free V4L2 fwnode data on unbind
Hi Rafael,
On Sun, Sep 18, 2022 at 11:32:46PM -0300, Rafael Mendonca wrote:
> The V4L2 fwnode data structure doesn't get freed on unbind, which leads to
> a memleak.
>
> Fixes: e43ccb0a045f ("media: i2c: Add support for the OV5648 image sensor")
> Signed-off-by: Rafael Mendonca <rafaelmendsr@...il.com>
> ---
> drivers/media/i2c/ov5648.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/i2c/ov5648.c b/drivers/media/i2c/ov5648.c
> index dfcd33e9ee13..95850f06112b 100644
> --- a/drivers/media/i2c/ov5648.c
> +++ b/drivers/media/i2c/ov5648.c
> @@ -2598,6 +2598,8 @@ static int ov5648_remove(struct i2c_client *client)
> mutex_destroy(&sensor->mutex);
> media_entity_cleanup(&subdev->entity);
>
> + v4l2_fwnode_endpoint_free(&sensor->endpoint);
> +
> return 0;
> }
>
> --
> 2.34.1
>
Looks good to me.
Reviewed-by: Tommaso Merciai <tommaso.merciai@...rulasolutions.com>
Regards,
Tommaso
--
Tommaso Merciai
Embedded Linux Engineer
tommaso.merciai@...rulasolutions.com
__________________________________
Amarula Solutions SRL
Via Le Canevare 30, 31100 Treviso, Veneto, IT
T. +39 042 243 5310
info@...rulasolutions.com
www.amarulasolutions.com
Powered by blists - more mailing lists