From: Heinrich Schuchardt Date: Sat, 2 Nov 2024 14:30:20 +0000 (+0100) Subject: cmd: upl: initialize unit test state X-Git-Url: http://git.dujemihanovic.xyz/projects?a=commitdiff_plain;h=504f36ed7a5273599813de10810b6e8b421289c4;p=u-boot.git cmd: upl: initialize unit test state do_upl_write() calls upl_get_test_data() which may increment the fail count in the unit test state. We should initialize it. Addresses-Coverity-ID: 510465 Uninitialized scalar variable Signed-off-by: Heinrich Schuchardt Reviewed-by: Neha Malcom Francis Reviewed-by: Simon Glass --- diff --git a/cmd/upl.c b/cmd/upl.c index 4996f36c78..c9a823bbc0 100644 --- a/cmd/upl.c +++ b/cmd/upl.c @@ -50,7 +50,7 @@ static int do_upl_write(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct upl s_upl, *upl = &s_upl; - struct unit_test_state uts; + struct unit_test_state uts = { 0 }; struct abuf buf; oftree tree; ulong addr;