[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 093/106] qdev: reorganize error reporting in bus_s
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 093/106] qdev: reorganize error reporting in bus_set_realized |
Date: |
Wed, 18 Jun 2014 19:21:50 +0300 |
From: Paolo Bonzini <address@hidden>
No semantic change.
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>
Tested-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
---
hw/core/qdev.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 3226a71..65aa041 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -573,27 +573,19 @@ static void bus_set_realized(Object *obj, bool value,
Error **errp)
if (value && !bus->realized) {
if (bc->realize) {
bc->realize(bus, &local_err);
-
- if (local_err != NULL) {
- goto error;
- }
-
}
} else if (!value && bus->realized) {
if (bc->unrealize) {
bc->unrealize(bus, &local_err);
-
- if (local_err != NULL) {
- goto error;
- }
}
}
- bus->realized = value;
- return;
+ if (local_err != NULL) {
+ error_propagate(errp, local_err);
+ return;
+ }
-error:
- error_propagate(errp, local_err);
+ bus->realized = value;
}
void qbus_create_inplace(void *bus, size_t size, const char *typename,
--
MST
- [Qemu-devel] [PULL v2 082/106] hostmem: add file-based HostMemoryBackend, (continued)
- [Qemu-devel] [PULL v2 082/106] hostmem: add file-based HostMemoryBackend, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 083/106] hostmem: add merge and dump properties, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 084/106] hostmem: allow preallocation of any memory region, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 085/106] hostmem: add property to map memory with MAP_SHARED, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 086/106] hostmem: add properties for NUMA memory policy, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 087/106] qmp: add query-memdev, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 089/106] tests: fix memory leak in test of string input visitor, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 088/106] hmp: add info memdev, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 090/106] qapi: make string input visitor parse int list, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 091/106] qapi: make string output visitor parse int list, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 093/106] qdev: reorganize error reporting in bus_set_realized,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 092/106] qapi: fix build on glib < 2.28, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 094/106] qdev: recursively unrealize devices when unrealizing bus, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 096/106] pc: acpi: do not hardcode preprocessor, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 095/106] qmp: clean out whitespace, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 097/106] numa: handle mmaped memory allocation failure correctly, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 099/106] acpi: introduce TYPE_ACPI_DEVICE_IF interface, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 098/106] qmp: add query-memory-devices command, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 100/106] acpi: implement ospm_status() method for PIIX4/ICH9_LPC devices, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 101/106] qmp: add query-acpi-ospm-status command, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 102/106] qmp: add ACPI_DEVICE_OST event handling, Michael S. Tsirkin, 2014/06/18