mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-14 16:46:23 +00:00
Fix coverity error in CSS SCMI driver
Change-Id: Ia7d731f429e452e4bc9f9a553d7105b6394c621c Signed-off-by: Soby Mathew <soby.mathew@arm.com>
This commit is contained in:
@@ -189,7 +189,7 @@ void css_scp_off(const psci_power_state_t *target_state)
|
||||
*/
|
||||
void css_scp_on(u_register_t mpidr)
|
||||
{
|
||||
int lvl = 0, ret;
|
||||
int lvl = 0, ret, core_pos;
|
||||
uint32_t scmi_pwr_state = 0;
|
||||
|
||||
for (; lvl <= PLAT_MAX_PWR_LVL; lvl++)
|
||||
@@ -198,8 +198,11 @@ void css_scp_on(u_register_t mpidr)
|
||||
|
||||
SCMI_SET_PWR_STATE_MAX_PWR_LVL(scmi_pwr_state, lvl - 1);
|
||||
|
||||
core_pos = plat_core_pos_by_mpidr(mpidr);
|
||||
assert(core_pos >= 0 && core_pos < PLATFORM_CORE_COUNT);
|
||||
|
||||
ret = scmi_pwr_state_set(scmi_handle,
|
||||
plat_css_core_pos_to_scmi_dmn_id_map[plat_core_pos_by_mpidr(mpidr)],
|
||||
plat_css_core_pos_to_scmi_dmn_id_map[core_pos],
|
||||
scmi_pwr_state);
|
||||
|
||||
if (ret != SCMI_E_QUEUED && ret != SCMI_E_SUCCESS) {
|
||||
|
||||
Reference in New Issue
Block a user