lkml.org 
[lkml]   [2016]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] of: resolver: Add missing of_node_get and of_node_put
From
Date
Hi Rob,

> On Feb 12, 2016, at 01:18 , Rob Herring <robh+dt@kernel.org> wrote:
>
> On Wed, Feb 3, 2016 at 12:09 PM, Amitoj Kaur Chawla
> <amitoj1606@gmail.com> wrote:
>> In __of_find_node_by_full_name, add an of_node_get when detecting the
>> desired element, to ensure that it ends up with a reference count that is
>> one greater than on entering the function.
>>
>> Also in __of_find_node_by_full_name, add an of_node_put on breaking
>> out of the for_each_child_of_node loop, to ensure that the reference
>> count of the returned value is not double incremented. This change
>> was made using Coccinelle.
>
> Pantelis, are you convinced this is correct (albeit somewhat pointless)?
>

This is good enough. It’s a local method and we won’t ever try to use
it outside of the resolver. We need to fix the reference counting properly
sometime in the future.

> Rob

Regards

— Pantelis

\
 
 \ /
  Last update: 2016-02-12 09:21    [W:0.049 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site