[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH] hw/arm/boot: fix uninitialized scalar variable wa

From: zhanghailiang
Subject: [Qemu-trivial] [PATCH] hw/arm/boot: fix uninitialized scalar variable warning reported by coverity
Date: Mon, 24 Nov 2014 11:30:33 +0800

Coverity reports the 'size' may be used uninitialized, but that can't happen,
because the caller has checked "if (binfo->dtb_filename || binfo->get_dtb)"
before call 'load_dtb'.

Here we simply remove the 'if (binfo->get_dtb)' to satisfy coverity.

Signed-off-by: zhanghailiang <address@hidden>
 hw/arm/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 0014c34..4f515b5 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -352,7 +352,7 @@ static int load_dtb(hwaddr addr, const struct arm_boot_info 
             goto fail;
-    } else if (binfo->get_dtb) {
+    } else {
         fdt = binfo->get_dtb(binfo, &size);
         if (!fdt) {
             fprintf(stderr, "Board was unable to create a dtb blob\n");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]