regulator: of: Add a missing 'of_node_put()' in an error handling path of 'of_regulat...
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 26 Jan 2018 22:13:44 +0000 (23:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:41 +0000 (07:52 +0200)
commitbd1a6e338c1b644c52b1d6196f43cca87334a399
tree11ee0d2328264b38efba62b005fdd764175ec6b6
parent36016bab698b7e604cd25ce6a8fd68951605c687
regulator: of: Add a missing 'of_node_put()' in an error handling path of 'of_regulator_match()'

[ Upstream commit 30966861a7a2051457be8c49466887d78cc47e97 ]

If an unlikely failure in 'of_get_regulator_init_data()' occurs, we must
release the reference on the current 'child' node before returning.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/regulator/of_regulator.c