diff options
Diffstat (limited to 'drivers/regulator/of_regulator.c')
| -rw-r--r-- | drivers/regulator/of_regulator.c | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 564f928eb1db..49f6c05fee34 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -422,7 +422,11 @@ device_node *regulator_of_get_init_node(struct device *dev,  		if (!strcmp(desc->of_match, name)) {  			of_node_put(search); -			return of_node_get(child); +			/* +			 * 'of_node_get(child)' is already performed by the +			 * for_each loop. +			 */ +			return child;  		}  	} | 
