mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
PM / OPP: fix incorrect OPP count handling in of_init_opp_table
commit 086abb5859 upstream.
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: Chander Kashyap <k.chander@samsung.com>
Signed-off-by: Inderpal Singh <inderpal.s@samsung.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a1e7be05dd
commit
d9d4f29b1e
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user