]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: act8865: Fix missing of_node_put() in act8865_pdata_from_dt()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 12 Jul 2016 11:23:50 +0000 (11:23 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 14 Jul 2016 16:22:22 +0000 (17:22 +0100)
commitb5103b9017a80e8341908c465ad7ffd3292360c8
treececfda5c016b60c526972d4a7889fecd888d44ec
parenteafb69e30fd2c5eb541ab8464cb7c24186e23039
regulator: act8865: Fix missing of_node_put() in act8865_pdata_from_dt()

This node pointer is returned by of_get_child_by_name() with
refcount incremented in this function. of_node_put() is missing
when exitting this function while invalid device type. Fix it
by move of_get_child_by_name() code after device type check.

Found by Coccinelle.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/act8865-regulator.c