diff --git a/module/power_domain/src/power_domain_utils.c b/module/power_domain/src/power_domain_utils.c index 0cd6739bf8abba2275f40e562d9b4de2a8a16afb..541c9a914baa8e1a878c3c2c742fb7444ebda82d 100644 --- a/module/power_domain/src/power_domain_utils.c +++ b/module/power_domain/src/power_domain_utils.c @@ -1,6 +1,6 @@ /* * Arm SCP/MCP Software - * Copyright (c) 2020-2024, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2020-2025, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause * @@ -42,6 +42,10 @@ static int create_core_cluster_pd_element_table( unsigned int core_element_counter = 0; unsigned int core_idx; unsigned int cluster_idx; + + if (cluster_count == 0) { + return FWK_E_PARAM; + } unsigned int cores_per_clusters = core_count / cluster_count; int status;