[RFC/PATCH 4/4] Add support for MSI on Axon-based Cell systems

Segher Boessenkool segher at kernel.crashing.org
Sat Jun 9 05:59:38 EST 2007


>>>>>> +       for_each_compatible_node(node, NULL, "ibm,axon-msic") {
>>>>>> +               if (axon_msi_setup_one(of_node_get(node)) == 0)
>>>>>> +                       found++;
>>>>>> +       }
>>>>>> +       of_node_put(node);
>>>
>>> So where is the of_node_put() done for the of_node_get()
>>> inside the loop?
>>
>> of_find_compatible_node does an of_node_put() on the device_node
>> that you pass in as the 'from' argument. In the last step, 'node'
>> is set to NULL and we put the previous element.
>
> That wasn't my question though?

Oh wait.  You're saying for_each_compatible_node() does
a put() on all nodes it traverses, but no get()?  Ouch!


Segher




More information about the Linuxppc-dev mailing list