target: fix clang static analyzer warning

Removes Warning:	line 6482, column 12
1st function call argument is an uninitialized value

Use target ptr directly as checked in previous lines instead of
dereferencing head->target

Change-Id: I6804b776fd493af71f3098d702f9cdc7acb50151
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6970
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Tomas Vanek 2022-05-09 22:54:59 +02:00 committed by Antonio Borneo
parent 7d2ea186cf
commit 0f11f951e7
1 changed files with 1 additions and 1 deletions

View File

@ -6477,7 +6477,7 @@ static int jim_target_smp(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
}
if (target && target->rtos)
retval = rtos_smp_init(head->target);
retval = rtos_smp_init(target);
return retval;
}