Commit da0ee72d authored by Sachin Kamat's avatar Sachin Kamat Committed by Mark Brown

regulator: max77686: Add missing of_node_put

Add of_node_put to decrement the ref count.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 398a6616
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment