fit_load_fdt forget to zero errp. Fix it.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>
Reviewed-by: Eric Blake <ebl...@redhat.com>
---
 hw/core/loader-fit.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/core/loader-fit.c b/hw/core/loader-fit.c
index 953b16bc82..11e4fad595 100644
--- a/hw/core/loader-fit.c
+++ b/hw/core/loader-fit.c
@@ -201,6 +201,7 @@ static int fit_load_fdt(const struct fit_loader *ldr, const 
void *itb,
     if (err == -ENOENT) {
         load_addr = ROUND_UP(kernel_end, 64 * KiB) + (10 * MiB);
         error_free(*errp);
+        *errp = NULL;
     } else if (err) {
         error_prepend(errp, "unable to read FDT load address from FIT: ");
         ret = err;
-- 
2.21.0


Reply via email to