regulator: max77686: 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:32 +05:30 committed by Mark Brown
parent 398a6616b5
commit da0ee72d6d
1 changed files with 2 additions and 0 deletions

View File

@ -412,6 +412,7 @@ static int max77686_pmic_dt_parse_pdata(struct platform_device *pdev,
if (!rdata) {
dev_err(&pdev->dev,
"could not allocate memory for regulator data\n");
of_node_put(regulators_np);
return -ENOMEM;
}
@ -425,6 +426,7 @@ static int max77686_pmic_dt_parse_pdata(struct platform_device *pdev,
}
pdata->regulators = rdata;
of_node_put(regulators_np);
return 0;
}