regulator: max8660: Add missing of_node_put

Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Sachin Kamat 2014-02-17 14:33:34 +05:30 committed by Mark Brown
parent 826adb4900
commit cde248f92f
1 changed files with 1 additions and 0 deletions

View File

@ -340,6 +340,7 @@ static int max8660_pdata_from_dt(struct device *dev,
rmatch[i].name = max8660_reg[i].name;
matched = of_regulator_match(dev, np, rmatch, ARRAY_SIZE(rmatch));
of_node_put(np);
if (matched <= 0)
return matched;