qemu-devel
[Top][All Lists]
Advanced

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

[PATCH v2 03/10] s390x/cpumodel: Fix harmless misuse of visit_check_stru


From: Markus Armbruster
Subject: [PATCH v2 03/10] s390x/cpumodel: Fix harmless misuse of visit_check_struct()
Date: Tue, 5 May 2020 12:19:01 +0200

Commit e47970f51d "s390x/cpumodel: Fix query-cpu-model-FOO error API
violations" neglected to change visit_check_struct()'s Error **
argument along with the others.  If visit_check_struct() failed, we'd
take the success path.  Fortunately, it can't fail here:
qobject_input_check_struct() checks we consumed the whole dictionary,
and to get here, we did.  Fix it anyway.

Cc: David Hildenbrand <address@hidden>
Cc: Cornelia Huck <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
---
 target/s390x/cpu_models.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 7c32180269..87a8028ad3 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -524,7 +524,7 @@ static void cpu_model_from_info(S390CPUModel *model, const 
CpuModelInfo *info,
             }
         }
         if (!err) {
-            visit_check_struct(visitor, errp);
+            visit_check_struct(visitor, &err);
         }
         visit_end_struct(visitor, NULL);
         visit_free(visitor);
-- 
2.21.1




reply via email to

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