target/semihosting_common: remove redundant NULL check

The value semihosting can never be NULL here.
Found by cppcheck.

Change-Id: Iff5cef0ffc78ec19bc7630bc2cc9bc4eea002e47
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9503
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Mark O'Donovan
2026-02-24 20:49:50 +00:00
committed by Antonio Borneo
parent 231aa88ee5
commit b8cfd06368
+1 -1
View File
@@ -1857,7 +1857,7 @@ COMMAND_HANDLER(handle_common_semihosting_command)
return ERROR_FAIL;
}
if (semihosting && semihosting->setup(target, is_active) != ERROR_OK) {
if (semihosting->setup(target, is_active) != ERROR_OK) {
LOG_ERROR("Failed to Configure semihosting");
return ERROR_FAIL;
}