diff mbox

opp: remove double calls to find_device_opp()

Message ID ad3feb97e2a3c80e8b3897a9ca17d682034e6de6.1418026567.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar Dec. 8, 2014, 8:16 a.m. UTC
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>
---
 drivers/base/power/opp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index 2d195f3..16c59f4 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' */