From 6b62d961373e0327f2af8fb77d6d5d6308864180 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Mon, 13 Jun 2016 18:57:57 -0300 Subject: error: Remove unnecessary local_err variables This patch simplifies code that uses a local_err variable just to immediately use it for an error_propagate() call. Coccinelle patch used to perform the changes added to scripts/coccinelle/remove_local_err.cocci. Reviewed-by: Eric Blake Acked-by: Cornelia Huck Signed-off-by: Eduardo Habkost Message-Id: <1465855078-19435-3-git-send-email-ehabkost@redhat.com> Reviewed-by: Markus Armbruster [Blank line in s390-virtio-ccw.c restored] Signed-off-by: Markus Armbruster --- target-i386/cpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'target-i386') diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 3665fecb5f..3bd3cfc3ad 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1875,7 +1875,6 @@ static void x86_cpu_get_feature_words(Object *obj, Visitor *v, { uint32_t *array = (uint32_t *)opaque; FeatureWord w; - Error *err = NULL; X86CPUFeatureWordInfo word_infos[FEATURE_WORDS] = { }; X86CPUFeatureWordInfoList list_entries[FEATURE_WORDS] = { }; X86CPUFeatureWordInfoList *list = NULL; @@ -1895,8 +1894,7 @@ static void x86_cpu_get_feature_words(Object *obj, Visitor *v, list = &list_entries[w]; } - visit_type_X86CPUFeatureWordInfoList(v, "feature-words", &list, &err); - error_propagate(errp, err); + visit_type_X86CPUFeatureWordInfoList(v, "feature-words", &list, errp); } static void x86_get_hv_spinlocks(Object *obj, Visitor *v, const char *name, -- cgit v1.2.3