kernel/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c
.. .. @@ -206,8 +206,9 @@ 206 206 /* check insert_above_mpcc exist in tree->opp_list */ 207 207 struct mpcc *temp_mpcc = tree->opp_list; 208 208 209 - while (temp_mpcc && temp_mpcc->mpcc_bot != insert_above_mpcc)210 - temp_mpcc = temp_mpcc->mpcc_bot;209 + if (temp_mpcc != insert_above_mpcc)210 + while (temp_mpcc && temp_mpcc->mpcc_bot != insert_above_mpcc)211 + temp_mpcc = temp_mpcc->mpcc_bot;211 212 if (temp_mpcc == NULL) 212 213 return NULL; 213 214 }