[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/17] e1000: Don't run e1000_instance_init() twice
From: |
Markus Armbruster |
Subject: |
[PATCH 10/17] e1000: Don't run e1000_instance_init() twice |
Date: |
Tue, 28 Apr 2020 18:34:12 +0200 |
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 <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
hw/net/e1000.c | 1 -
1 file changed, 1 deletion(-)
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);
}
--
2.21.1
- Re: [PATCH 02/17] qom: Clean up inconsistent use of gchar * vs. char *, (continued)
- [PATCH 07/17] tests/check-qom-proplist: Improve iterator coverage, Markus Armbruster, 2020/04/28
- [PATCH 06/17] qom: Drop object_property_set_description() parameter @errp, Markus Armbruster, 2020/04/28
- [PATCH 12/17] qdev: Clean up qdev_connect_gpio_out_named(), Markus Armbruster, 2020/04/28
- [PATCH 05/17] qom: Make all the object_property_add_FOO() return the property, Markus Armbruster, 2020/04/28
- [PATCH 11/17] hw/arm/bcm2835: Drop futile attempts at QOM-adopting memory, Markus Armbruster, 2020/04/28
- [PATCH 10/17] e1000: Don't run e1000_instance_init() twice,
Markus Armbruster <=
- [PATCH 14/17] Drop more @errp parameters after previous commit, Markus Armbruster, 2020/04/28
- [PATCH 08/17] s390x/cpumodel: Fix UI to CPU features pcc-cmac-{aes, eaes}-256, Markus Armbruster, 2020/04/28
- [PATCH 15/17] qdev: Unrealize must not fail, Markus Armbruster, 2020/04/28
- [PATCH 16/17] spapr_pci: Drop some dead error handling, Markus Armbruster, 2020/04/28