mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH v2] media: mdp3: Fix resource leak in for_each_child_of_node() loop
       [not found] <20230719080632.13357-1-luhongfei@vivo.com>
@ 2023-07-19  8:21 ` Hans Verkuil
  0 siblings, 0 replies; only message in thread
From: Hans Verkuil @ 2023-07-19  8:21 UTC (permalink / raw)
  To: 路红飞,
	Mauro Carvalho Chehab, Matthias Brugger,
	AngeloGioacchino Del Regno, Moudy Ho, Sun Ke, Deepak R Varma,
	linux-media, linux-kernel, linux-arm-kernel, linux-mediatek
  Cc: opensource.kernel

You mailed this as an HTML email instead of ASCII. HTML emails are silently rejected by
the mailinglist, so please repost as an ASCII email, as you did before.

Thank you!

    Hans

On 19/07/2023 10:06, 路红飞 wrote:
> for_each_child_of_node should have of_node_put()
> in error path avoid resource leaks.
>
> Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
> ---
> Changelog:
> v1->v2:
> 1. Change the subject line of this patch to include driver name.
> 2. Remove the unneeded of_node_put.
>
>  drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c
> index a605e80c7dc3..40c4b79a5090 100644
> --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c
> +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c
> @@ -1135,6 +1135,7 @@ int mdp_comp_config(struct mdp_dev *mdp)
>  		comp = mdp_comp_create(mdp, node, id);
>  		if (IS_ERR(comp)) {
>  			ret = PTR_ERR(comp);
> +			of_node_put(node);
>  			goto err_init_comps;
>  		}
>  



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-19  8:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230719080632.13357-1-luhongfei@vivo.com>
2023-07-19  8:21 ` [PATCH v2] media: mdp3: Fix resource leak in for_each_child_of_node() loop Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®