Subject: Re: [PATCH 06/18] Make ft_node_add() accept and return NULL.

From: Scott Wood <[email-masked]>
Date: Wed, 24 Jan 2007 16:02:54 -0600

Segher Boessenkool wrote:
>> Currently, if ft_node_add() is passed NULL it will allocate an  entry for
>> it and return a non-NULL phandle.  This patch makes it simply pass the
>> NULL through.
> 
> 
> Hrm, is this a good thing?  Shouldn't you just BUG_ON()
> instead?

There are times where NULL is normal -- such as at the end of an 
iteration to find every instance of a certain type of node, or to follow 
parentage to the root node.  Having ft_node_add() pass the NULL through 
keeps it from being a special case in all of the wrapper code that turns 
the internal node into a phandle before returning.

-Scott