PM / OPP: set new_opp->dev_opp to a valid dev_opp
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 9 Dec 2014 05:48:51 +0000 (11:18 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 10 Dec 2014 01:32:51 +0000 (02:32 +0100)
commit7284a00f17290114d304528fc49aeee5c2b9b433
treee0f9cfe6938907d8cd714abbe16e28563d90cfe7
parentb4037aaa584bd914bbf578f5ceb2d9884fa7ddb6
PM / OPP: set new_opp->dev_opp to a valid dev_opp

We find/allocate dev_opp after using its value to fill new_opp->dev_opp right
now. Move this to a later point where dev_opp is valid.

Fixes: a7470db6fec4 (PM / OPP don't match for existing OPPs when list is empty)
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/opp.c