From 580171f5c246fc62306244af3c83bfa32ff1f43f Mon Sep 17 00:00:00 2001 From: Mary Guillemard Date: Fri, 1 Nov 2024 17:07:48 +0100 Subject: [PATCH] cortexar: Check the result of cortexar_ensure_core_powered Signed-off-by: Mary Guillemard --- src/target/cortexar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/target/cortexar.c b/src/target/cortexar.c index 85f5da04e02..9409e9b54ed 100644 --- a/src/target/cortexar.c +++ b/src/target/cortexar.c @@ -795,7 +795,8 @@ static target_s *cortexar_probe( target->halt_resume = cortexar_halt_resume; /* Ensure the core is powered up and we can talk to it */ - cortexar_ensure_core_powered(target); + if (cortexar_ensure_core_powered(target)) + return false; /* Try to halt the target core */ target_halt_request(target);