mmrm: Fix KW error

Initialize variable before use.
Moved statement to correct block.

Change-Id: I6effe4a8d2363596250bbd663e68f1c6bea07589
Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
This commit is contained in:
Mahesh Kumar Sharma
2021-08-05 10:41:06 -07:00
committed by Gerrit - the friendly Code Review server
parent b5fa8d8109
commit 91770b6061

View File

@@ -518,12 +518,10 @@ static int mmrm_sw_throttle_low_priority_client(
d_mpr_h("%s:csid(0x%x) name(%s)\n",
__func__, tbl_entry_throttle_client->clk_src_id,
tbl_entry_throttle_client->name);
}
d_mpr_h("%s:now_cur_ma(%llu) min_cur_ma(%llu) delta_cur(%d)\n",
__func__, now_cur_ma, min_cur_ma, *delta_cur);
if (!IS_ERR_OR_NULL(tbl_entry_throttle_client)
&& (now_cur_ma > min_cur_ma)
if ((now_cur_ma > min_cur_ma)
&& (now_cur_ma - min_cur_ma > *delta_cur)) {
found_client_throttle = true;
d_mpr_h("%s: Throttle client csid(0x%x) name(%s)\n",
@@ -535,6 +533,7 @@ static int mmrm_sw_throttle_low_priority_client(
break;
}
}
}
/*Client to throttle is found, Throttle this client now to minimum clock rate*/
if (found_client_throttle) {