[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/3] qdev: add missing error check
From: |
arei.gonglei |
Subject: |
[Qemu-devel] [PATCH 1/3] qdev: add missing error check |
Date: |
Tue, 19 Aug 2014 17:41:43 +0800 |
From: Gonglei <address@hidden>
If local_err is not null, the next code logic is useless.
Signed-off-by: Gonglei <address@hidden>
---
hw/core/qdev.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index da1ba48..3e7085e 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -830,6 +830,11 @@ static void device_set_realized(Object *obj, bool value,
Error **errp)
g_free(name);
}
+ if (local_err != NULL) {
+ error_propagate(errp, local_err);
+ return;
+ }
+
if (dc->realize) {
dc->realize(dev, &local_err);
}
--
1.7.12.4