提交 5aaa9cc7 编写于 作者: V Viresh Kumar 提交者: Rafael J. Wysocki

cpufreq: cpufreq-cpu0: Free parent node for error cases

We are freeing parent node in success cases but not in failure cases.
Let's do it.
Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
Acked-by: NShawn Guo <shawn.guo@linaro.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 fc31d6f5
......@@ -189,7 +189,8 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
if (!np) {
pr_err("failed to find cpu0 node\n");
return -ENOENT;
ret = -ENOENT;
goto out_put_parent;
}
cpu_dev = &pdev->dev;
......@@ -274,6 +275,8 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
opp_free_cpufreq_table(cpu_dev, &freq_table);
out_put_node:
of_node_put(np);
out_put_parent:
of_node_put(parent);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册