public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Franck Jullien <franck.jullien@odyssee-systemes.fr>
Cc: linux-media@vger.kernel.org, hyun.kwon@xilinx.com
Subject: Re: [PATCH] [media] xilinx-vipp: remove unnecessary of_node_put
Date: Tue, 22 Mar 2016 14:12:59 +0200	[thread overview]
Message-ID: <21142136.KJJkg38sI8@avalon> (raw)
In-Reply-To: <1458643438-3486-1-git-send-email-franck.jullien@odyssee-systemes.fr>

Hi Frank,

Thank you for the patch.

On Tuesday 22 Mar 2016 11:43:58 Franck Jullien wrote:
> of_graph_get_next_endpoint(node, ep) decrements refcount on
> ep. When next==NULL we break and refcount on ep is decremented
> again.
> 
> Signed-off-by: Franck Jullien <franck.jullien@odyssee-systemes.fr>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I don't have patches queued for Xilinx drivers, would you like to push this 
one to Mauro directly, or would you prefer me to take it in my tree ?

> ---
>  drivers/media/platform/xilinx/xilinx-vipp.c |    8 ++------
>  1 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c
> b/drivers/media/platform/xilinx/xilinx-vipp.c index e795a45..feb3b2f 100644
> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
> @@ -351,19 +351,15 @@ static int xvip_graph_parse_one(struct
> xvip_composite_device *xdev, struct xvip_graph_entity *entity;
>  	struct device_node *remote;
>  	struct device_node *ep = NULL;
> -	struct device_node *next;
>  	int ret = 0;
> 
>  	dev_dbg(xdev->dev, "parsing node %s\n", node->full_name);
> 
>  	while (1) {
> -		next = of_graph_get_next_endpoint(node, ep);
> -		if (next == NULL)
> +		ep = of_graph_get_next_endpoint(node, ep);
> +		if (ep == NULL)
>  			break;
> 
> -		of_node_put(ep);
> -		ep = next;
> -
>  		dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name);
> 
>  		remote = of_graph_get_remote_port_parent(ep);

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2016-03-22 12:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 10:43 [PATCH] [media] xilinx-vipp: remove unnecessary of_node_put Franck Jullien
2016-03-22 12:12 ` Laurent Pinchart [this message]
2016-03-22 13:06   ` Franck Jullien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21142136.KJJkg38sI8@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=franck.jullien@odyssee-systemes.fr \
    --cc=hyun.kwon@xilinx.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox