All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hyun Kwon <hyun.kwon@xilinx.com>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	Steve Longerbeam <slongerbeam@gmail.com>,
	Hyun Kwon <hyunk@xilinx.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [PATCH] media: xilinx-video: fix bad of_node_put() on endpoint error
Date: Wed, 7 Nov 2018 17:22:57 -0800	[thread overview]
Message-ID: <20181108012254.GA25124@smtp.xilinx.com> (raw)
In-Reply-To: <1541337070-4917-1-git-send-email-akinobu.mita@gmail.com>

Hi Akinobu,

Thanks for the patch.

On Sun, 2018-11-04 at 05:11:10 -0800, Akinobu Mita wrote:
> The fwnode_graph_get_next_endpoint() returns an 'endpoint' node pointer
> with refcount incremented, and refcount of the passed as a previous
> 'endpoint' node is decremented.
> 
> So when iterating over all nodes using fwnode_graph_get_next_endpoint(),
> we don't need to call fwnode_handle_put() for each node except for error
> exit paths.  Otherwise we get "OF: ERROR: Bad of_node_put() on ..."
> messages.
> 
> Fixes: d079f94c9046 ("media: platform: Switch to v4l2_async_notifier_add_subdev")
> Cc: Steve Longerbeam <slongerbeam@gmail.com>
> Cc: Hyun Kwon <hyun.kwon@xilinx.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>

This looks good to me,

     Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>

Thanks,
-hyun

> ---
>  drivers/media/platform/xilinx/xilinx-vipp.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c
> index 574614d..26b13fd 100644
> --- a/drivers/media/platform/xilinx/xilinx-vipp.c
> +++ b/drivers/media/platform/xilinx/xilinx-vipp.c
> @@ -377,8 +377,6 @@ static int xvip_graph_parse_one(struct xvip_composite_device *xdev,
>  			goto err_notifier_cleanup;
>  		}
>  
> -		fwnode_handle_put(ep);
> -
>  		/* Skip entities that we have already processed. */
>  		if (remote == of_fwnode_handle(xdev->dev->of_node) ||
>  		    xvip_graph_find_entity(xdev, remote)) {
> -- 
> 2.7.4
> 

  reply	other threads:[~2018-11-08 11:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-04 13:11 [PATCH] media: xilinx-video: fix bad of_node_put() on endpoint error Akinobu Mita
2018-11-08  1:22 ` Hyun Kwon [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-10-12 16:04 Akinobu Mita
2017-12-11 13:33 ` Laurent Pinchart

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=20181108012254.GA25124@smtp.xilinx.com \
    --to=hyun.kwon@xilinx.com \
    --cc=akinobu.mita@gmail.com \
    --cc=hyunk@xilinx.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=slongerbeam@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.