On 24.04.20 21:20, Markus Armbruster wrote: > Commit e47970f51d "s390x/cpumodel: Fix query-cpu-model-FOO error API > violations" neglected to change visit_end_struct()'s Error ** argument > along with the others. If visit_end_struct() failed, we'd take the
s/visit_end_struct/visit_check_struct/ ? > 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. AFAIKs, if visit_check_struct() failed, we'd still do the memcopy, but also report the error. Not nice, not bad. Reviewed-by: David Hildenbrand <da...@redhat.com> > > Cc: David Hildenbrand <da...@redhat.com> > Cc: Cornelia Huck <coh...@redhat.com> > Signed-off-by: Markus Armbruster <arm...@redhat.com> > --- > 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); > -- Thanks, David / dhildenb