[PATCH] drm/imx: Fix of_node ref counting

2016-09-05 Thread Philipp Zabel
Am Montag, den 05.09.2016, 10:01 +0200 schrieb Philipp Zabel: > Hi Christophe, > > Am Sonntag, den 04.09.2016, 08:45 +0200 schrieb Christophe JAILLET: > > This code is spurious. > > It takes a ref on a node, then call 'of_node_put' on it and then store > > this node somewhere. > > The node

[PATCH] drm/imx: Fix of_node ref counting

2016-09-05 Thread Philipp Zabel
Hi Christophe, Am Sonntag, den 04.09.2016, 08:45 +0200 schrieb Christophe JAILLET: > This code is spurious. > It takes a ref on a node, then call 'of_node_put' on it and then store > this node somewhere. The node pointer is not stored. Note that np is not dereferenced at all, we just compare the

[PATCH] drm/imx: Fix of_node ref counting

2016-09-04 Thread Christophe JAILLET
This code is spurious. It takes a ref on a node, then call 'of_node_put' on it and then store this node somewhere. It is likely that taking the ref on the parent node and releasing the child node was expected instead. So, use 'of_get_next_parent' instead. It does all this in just one function