summaryrefslogtreecommitdiffstats
path: root/hw/net
diff options
context:
space:
mode:
authorMarkus Armbruster2020-05-05 17:29:19 +0200
committerMarkus Armbruster2020-05-15 07:07:58 +0200
commita13f20422dc657719c3fa335788300c7ccf464ee (patch)
treed0e83a1e23a15e7c43d9d7399d6562f7fe801b4c /hw/net
parenthw/isa/superio: Make the components QOM children (diff)
downloadqemu-a13f20422dc657719c3fa335788300c7ccf464ee.tar.gz
qemu-a13f20422dc657719c3fa335788300c7ccf464ee.tar.xz
qemu-a13f20422dc657719c3fa335788300c7ccf464ee.zip
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: Markus Armbruster <armbru@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200505152926.18877-12-armbru@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r--hw/net/e1000.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 2a69eee63f..0d2c2759e3 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -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);
}