提交 086abb58 编写于 作者: C Chander Kashyap 提交者: Rafael J. Wysocki

PM / OPP: fix incorrect OPP count handling in of_init_opp_table

In of_init_opp_table function, if a failure to add an OPP is
detected, the count of OPPs, yet to be added is not updated.
Fix this by decrementing this count on failure as well.
Signed-off-by: NChander Kashyap <k.chander@samsung.com>
Signed-off-by: NInderpal Singh <inderpal.s@samsung.com>
Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
Cc: 3.7+ <stable@vger.kernel.org> # 3.7+
Acked-by: NNishanth Menon <nm@ti.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 d6d211db
......@@ -734,11 +734,9 @@ int of_init_opp_table(struct device *dev)
unsigned long freq = be32_to_cpup(val++) * 1000;
unsigned long volt = be32_to_cpup(val++);
if (dev_pm_opp_add(dev, freq, volt)) {
if (dev_pm_opp_add(dev, freq, volt))
dev_warn(dev, "%s: Failed to add OPP %ld\n",
__func__, freq);
continue;
}
nr -= 2;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册