[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200608074649.bppdrdoxn6xig6jy@pengutronix.de>
Date: Mon, 8 Jun 2020 09:46:49 +0200
From: Marco Felsch <m.felsch@...gutronix.de>
To: Chuhong Yuan <hslester96@...il.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: tvp5150: Add missed media_entity_cleanup()
Hi,
thanks for covering that. Appart of the fact that this function does
nothing:
Reviewed-by: Marco Felsch <m.felsch@...gutronix.de>
On 20-06-06 22:39, Chuhong Yuan wrote:
> This driver does not call media_entity_cleanup() in the error handler
> of tvp5150_registered() and tvp5150_remove(), while it has called
> media_entity_pads_init() at first.
> Add the missed calls to fix it.
>
> Fixes: 0556f1d580d4 ("media: tvp5150: add input source selection of_graph support")
> Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> ---
> drivers/media/i2c/tvp5150.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
> index eb39cf5ea089..9df575238952 100644
> --- a/drivers/media/i2c/tvp5150.c
> +++ b/drivers/media/i2c/tvp5150.c
> @@ -1664,8 +1664,10 @@ static int tvp5150_registered(struct v4l2_subdev *sd)
> return 0;
>
> err:
> - for (i = 0; i < decoder->connectors_num; i++)
> + for (i = 0; i < decoder->connectors_num; i++) {
> media_device_unregister_entity(&decoder->connectors[i].ent);
> + media_entity_cleanup(&decoder->connectors[i].ent);
> + }
> return ret;
> #endif
>
> @@ -2248,8 +2250,10 @@ static int tvp5150_remove(struct i2c_client *c)
>
> for (i = 0; i < decoder->connectors_num; i++)
> v4l2_fwnode_connector_free(&decoder->connectors[i].base);
> - for (i = 0; i < decoder->connectors_num; i++)
> + for (i = 0; i < decoder->connectors_num; i++) {
> media_device_unregister_entity(&decoder->connectors[i].ent);
> + media_entity_cleanup(&decoder->connectors[i].ent);
> + }
> v4l2_async_unregister_subdev(sd);
> v4l2_ctrl_handler_free(&decoder->hdl);
> pm_runtime_disable(&c->dev);
> --
> 2.26.2
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists