diff options
| -rw-r--r-- | drivers/regulator/of_regulator.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index ea4f36f2cbe2..c58c8d178948 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c | |||
| @@ -119,7 +119,8 @@ EXPORT_SYMBOL_GPL(of_get_regulator_init_data); | |||
| 119 | * regulator. The data parsed from a child node will be matched to a regulator | 119 | * regulator. The data parsed from a child node will be matched to a regulator |
| 120 | * based on either the deprecated property regulator-compatible if present, | 120 | * based on either the deprecated property regulator-compatible if present, |
| 121 | * or otherwise the child node's name. Note that the match table is modified | 121 | * or otherwise the child node's name. Note that the match table is modified |
| 122 | * in place. | 122 | * in place and an additional of_node reference is taken for each matched |
| 123 | * regulator. | ||
| 123 | * | 124 | * |
| 124 | * Returns the number of matches found or a negative error code on failure. | 125 | * Returns the number of matches found or a negative error code on failure. |
| 125 | */ | 126 | */ |
| @@ -162,7 +163,7 @@ int of_regulator_match(struct device *dev, struct device_node *node, | |||
| 162 | child->name); | 163 | child->name); |
| 163 | return -EINVAL; | 164 | return -EINVAL; |
| 164 | } | 165 | } |
| 165 | match->of_node = child; | 166 | match->of_node = of_node_get(child); |
| 166 | count++; | 167 | count++; |
| 167 | break; | 168 | break; |
| 168 | } | 169 | } |
