mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Khoroshilov <khoroshilov@ispras.ru>
To: Nicholas Mc Guire <der.herr@hofr.at>
Cc: Mats Randgaard <matrandg@cisco.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	ldv-project@linuxtesting.org, sil2review@lists.osadl.org,
	linux-kernel@vger.kernel.org, Julia Lawall <julia.lawall@lip6.fr>,
	linux-media@vger.kernel.org
Subject: Re: [SIL2review] [PATCH] media: tc358743: release device_node in tc358743_probe_of()
Date: Sun, 3 Jun 2018 01:11:49 +0300	[thread overview]
Message-ID: <a89812ad-8cbb-129f-4bb2-0c1d92d28598@ispras.ru> (raw)
In-Reply-To: <20180526143834.GA28325@osadl.at>

On 26.05.2018 17:38, Nicholas Mc Guire wrote:
> On Sat, May 26, 2018 at 12:54:00AM +0300, Alexey Khoroshilov wrote:
>> of_graph_get_next_endpoint() returns device_node with refcnt increased,
>> but these is no of_node_put() for it.
> 
> I think this is correct - but would it not be simpler to do
> 
>    endpoint = v4l2_fwnode_endpoint_alloc_parse(of_fwnode_handle(ep));
>    of_node_put(ep);
>    if (IS_ERR(endpoint)) {
>    ....
> 
> As the of_node_put(np) actually is unconditional anyway I think this
> should be semantically equivalent.

You are right. But the same is true for
v4l2_fwnode_endpoint_free(endpoint);
that is already correctly handled by the driver.
So, I have preferred to follow the same pattern.


> 
>>
>> The patch adds one on error and normal paths.
>>
>> Found by Linux Driver Verification project (linuxtesting.org).
>>
>> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
> Reviewed-by: Nicholas Mc Guire <der.herr@hofr.at>


Thank you,
Alexey

      reply	other threads:[~2018-06-02 22:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 21:54 Alexey Khoroshilov
2018-05-26 14:38 ` [SIL2review] " Nicholas Mc Guire
2018-06-02 22:11   ` Alexey Khoroshilov [this message]

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=a89812ad-8cbb-129f-4bb2-0c1d92d28598@ispras.ru \
    --to=khoroshilov@ispras.ru \
    --cc=der.herr@hofr.at \
    --cc=julia.lawall@lip6.fr \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=matrandg@cisco.com \
    --cc=mchehab@kernel.org \
    --cc=sil2review@lists.osadl.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

all inboxes | Powered by JetHome®