From: Viresh Kumar <viresh.kumar@linaro.org>
Date: Mon, 8 Dec 2014 08:16:18 +0000 (+0530)
Subject: PM / OPP: remove double calls to find_device_opp()
X-Git-Tag: firefly_0821_release~176^2~2582^2~3^2~8
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2a6127d037de96e8add0b09e0200b331a4db54be;p=firefly-linux-kernel-4.4.55.git

PM / OPP: remove double calls to find_device_opp()

By mistake we called find_device_opp() twice in of_free_opp_table(), fix it.

Generated diff doesn't show the problem well and so here is the code snippet:

void of_free_opp_table(struct device *dev)
{
	struct device_opp *dev_opp = find_device_opp(dev);
	struct dev_pm_opp *opp, *tmp;

	/* Check for existing list for 'dev' */
	dev_opp = find_device_opp(dev);

	...
}

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---

diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index c2020520b2bf..1bbef8e838e7 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -768,7 +768,7 @@ EXPORT_SYMBOL_GPL(of_init_opp_table);
  */
 void of_free_opp_table(struct device *dev)
 {
-	struct device_opp *dev_opp = find_device_opp(dev);
+	struct device_opp *dev_opp;
 	struct dev_pm_opp *opp, *tmp;
 
 	/* Check for existing list for 'dev' */