linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: davinci: vpif: add missing of_node_put() in vpif_probe()
@ 2022-05-11  6:55 Yang Yingliang
  2022-05-18 19:39 ` Lad, Prabhakar
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2022-05-11  6:55 UTC (permalink / raw)
  To: linux-kernel, linux-media; +Cc: mchehab, prabhakar.csengg

of_graph_get_next_endpoint() returns an 'endpoint' node pointer
with refcount incremented. The refcount should be decremented
before returning from vpif_probe().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/media/platform/ti/davinci/vpif.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/ti/davinci/vpif.c b/drivers/media/platform/ti/davinci/vpif.c
index 97ef770266af..da27da4c165a 100644
--- a/drivers/media/platform/ti/davinci/vpif.c
+++ b/drivers/media/platform/ti/davinci/vpif.c
@@ -469,6 +469,7 @@ static int vpif_probe(struct platform_device *pdev)
 					      endpoint);
 	if (!endpoint)
 		return 0;
+	of_node_put(endpoint);
 
 	/*
 	 * For DT platforms, manually create platform_devices for
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: davinci: vpif: add missing of_node_put() in vpif_probe()
  2022-05-11  6:55 [PATCH] media: davinci: vpif: add missing of_node_put() in vpif_probe() Yang Yingliang
@ 2022-05-18 19:39 ` Lad, Prabhakar
  0 siblings, 0 replies; 2+ messages in thread
From: Lad, Prabhakar @ 2022-05-18 19:39 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: LKML, linux-media, Mauro Carvalho Chehab

On Wed, May 11, 2022 at 7:44 AM Yang Yingliang <yangyingliang@huawei.com> wrote:
>
> of_graph_get_next_endpoint() returns an 'endpoint' node pointer
> with refcount incremented. The refcount should be decremented
> before returning from vpif_probe().
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/media/platform/ti/davinci/vpif.c | 1 +
>  1 file changed, 1 insertion(+)
>
Reviewed-by: Lad Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
Prabhakar

> diff --git a/drivers/media/platform/ti/davinci/vpif.c b/drivers/media/platform/ti/davinci/vpif.c
> index 97ef770266af..da27da4c165a 100644
> --- a/drivers/media/platform/ti/davinci/vpif.c
> +++ b/drivers/media/platform/ti/davinci/vpif.c
> @@ -469,6 +469,7 @@ static int vpif_probe(struct platform_device *pdev)
>                                               endpoint);
>         if (!endpoint)
>                 return 0;
> +       of_node_put(endpoint);
>
>         /*
>          * For DT platforms, manually create platform_devices for
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-18 19:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11  6:55 [PATCH] media: davinci: vpif: add missing of_node_put() in vpif_probe() Yang Yingliang
2022-05-18 19:39 ` Lad, Prabhakar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).