lkml.org 
[lkml]   [2014]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/8] [media] soc_camera: Do not decrement endpoint node refcount in the loop
Hi Philippe,

On Thu, 11 Sep 2014, Philipp Zabel wrote:

> In preparation for a following patch, stop decrementing the endpoint node
> refcount in the loop. This temporarily leaks a reference to the endpoint node,
> which will be fixed by having of_graph_get_next_endpoint decrement the refcount
> of its prev argument instead.
>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
> drivers/media/platform/soc_camera/soc_camera.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
> index f4308fe..f752489 100644
> --- a/drivers/media/platform/soc_camera/soc_camera.c
> +++ b/drivers/media/platform/soc_camera/soc_camera.c
> @@ -1696,11 +1696,11 @@ static void scan_of_host(struct soc_camera_host *ici)
> if (!i)
> soc_of_bind(ici, epn, ren->parent);
>
> - of_node_put(epn);
> of_node_put(ren);
>
> if (i) {
> dev_err(dev, "multiple subdevices aren't supported yet!\n");
> + of_node_put(epn);

Sorry, this doesn't look right to me. I think you want to drop the last
reference _after_ the loop, not in this temporary check for multiple
endpoints, which your patch has nothing to do with.

Thanks
Guennadi

> break;
> }
> }
> --
> 2.1.0
>


\
 
 \ /
  Last update: 2014-09-20 10:01    [W:0.101 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site