Commit a13f2042 authored by Markus Armbruster's avatar Markus Armbruster
Browse files

e1000: Don't run e1000_instance_init() twice



QOM object initialization runs .instance_init() for the type and all
its supertypes; see object_init_with_type().

Both TYPE_E1000_BASE and its concrete subtypes set .instance_init() to
e1000_instance_init().  For the concrete subtypes, it duly gets run
twice.  The second run fails, but the error gets ignored (a later
commit will change that).

Remove it from the subtypes.

Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200505152926.18877-12-armbru@redhat.com>
parent e5084306
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1824,7 +1824,6 @@ static void e1000_register_types(void)
        type_info.parent = TYPE_E1000_BASE;
        type_info.class_data = (void *)info;
        type_info.class_init = e1000_class_init;
        type_info.instance_init = e1000_instance_init;

        type_register(&type_info);
    }