diff mbox

[for-2.10,3/5] util: propagate error for device_func_init()

Message ID 1490945793-21276-4-git-send-email-peterx@redhat.com
State New
Headers show

Commit Message

Peter Xu March 31, 2017, 7:36 a.m. UTC
We have error_propagate(). Use it.

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 vl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/vl.c b/vl.c
index b97b32a..b18bde7 100644
--- a/vl.c
+++ b/vl.c
@@ -2304,7 +2304,7 @@  int device_init_func(void *opaque, QemuOpts *opts, Error **errp)
 
     dev = qdev_device_add(opts, &err);
     if (!dev) {
-        error_report_err(err);
+        error_propagate(errp, err);
         return -1;
     }
     object_unref(OBJECT(dev));