]> git.baikalelectronics.ru Git - kernel.git/commit
of/base: release the node correctly in of_parse_phandle_with_args()
authorTang Yuantian <yuantian.tang@freescale.com>
Wed, 10 Apr 2013 03:36:39 +0000 (11:36 +0800)
committerGrant Likely <grant.likely@linaro.org>
Wed, 17 Apr 2013 14:53:12 +0000 (15:53 +0100)
commite8f64208eea5e163ad192424424938c2a9210e22
tree881f7a861790c977ad6d645bf2928b72a15d4d20
parent7c35d4cf081a004901c10da43ee432e9e4ce9d10
of/base: release the node correctly in of_parse_phandle_with_args()

Call of_node_put() only when the out_args is NULL on success,
or the node's reference count will not be correct because the caller
will call of_node_put() again.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
[grant.likely: tightened up the patch]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
drivers/of/base.c