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:
parent
398a6616b5
commit
da0ee72d6d
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue