From 05af272f9b717c2d11bec7a12a72ad155da169c0 Mon Sep 17 00:00:00 2001 From: Haaris Farooq Date: Fri, 26 Jul 2024 12:45:37 +0100 Subject: [PATCH] juno: Fix redundant check in mod_juno_reset_domain Fixes a redundant check in mod_juno_reset_domain.c which causes cppcheck to fail when building for juno with the SCP_ENABLE_SCMI_RESET build flag enabled Signed-off-by: Haaris Farooq --- .../src/mod_juno_reset_domain.c | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/product/juno/module/juno_reset_domain/src/mod_juno_reset_domain.c b/product/juno/module/juno_reset_domain/src/mod_juno_reset_domain.c index 99db91bbf..92717f1b6 100644 --- a/product/juno/module/juno_reset_domain/src/mod_juno_reset_domain.c +++ b/product/juno/module/juno_reset_domain/src/mod_juno_reset_domain.c @@ -1,6 +1,6 @@ /* * Arm SCP/MCP Software - * Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2020-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause * @@ -104,20 +104,18 @@ static int juno_set_reset_state(fwk_id_t dev_id, dev_ctx = &module_juno_reset_ctx.dev_ctx_table[domain_idx]; - if (domain_idx == JUNO_RESET_DOMAIN_IDX_UART) { - status = handle_uart_reset_set_state(dev_ctx); - if (status != FWK_SUCCESS) { - return status; - } - - params = (struct mod_reset_domain_autoreset_event_params *) - autoreset_event.params; - params->dev_id = dev_id; - params->reset_state = reset_state; - params->cookie = cookie; - fwk_put_event(&autoreset_event); + status = handle_uart_reset_set_state(dev_ctx); + if (status != FWK_SUCCESS) { + return status; } + params = (struct mod_reset_domain_autoreset_event_params *) + autoreset_event.params; + params->dev_id = dev_id; + params->reset_state = reset_state; + params->cookie = cookie; + fwk_put_event(&autoreset_event); + return FWK_SUCCESS; } -- GitLab