diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index 2d195f3a199899451cfd29ee54949891f85a6a5d..c2020520b2bf34da6239ab133a9eeb9d1efe89ad 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -400,7 +400,6 @@ static int dev_pm_opp_add_dynamic(struct device *dev, unsigned long freq,
 	mutex_lock(&dev_opp_list_lock);
 
 	/* populate the opp table */
-	new_opp->dev_opp = dev_opp;
 	new_opp->rate = freq;
 	new_opp->u_volt = u_volt;
 	new_opp->available = true;
@@ -460,6 +459,7 @@ static int dev_pm_opp_add_dynamic(struct device *dev, unsigned long freq,
 	}
 
 list_add:
+	new_opp->dev_opp = dev_opp;
 	list_add_rcu(&new_opp->node, head);
 	mutex_unlock(&dev_opp_list_lock);