Patchwork [qmp,v4,2/6] hw/core/qdev: Delete dead code

login
register
mail settings
Submitter Peter Crosthwaite
Date Jan. 2, 2014, 2:47 a.m.
Message ID <a037081880d9fcbb701809da936e41a46fe01163.1388630311.git.peter.crosthwaite@xilinx.com>
Download mbox | patch
Permalink /patch/306035/
State New
Headers show

Comments

Peter Crosthwaite - Jan. 2, 2014, 2:47 a.m.
This is unreachable code, as it's already asserted that no errors have
occurred. Delete.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
---

 hw/core/qdev.c | 5 -----
 1 file changed, 5 deletions(-)

Patch

diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index e374a93..adbff18 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -746,11 +746,6 @@  static void device_initfn(Object *obj)
         }
         class = object_class_get_parent(class);
     } while (class != object_class_by_name(TYPE_DEVICE));
-    if (err != NULL) {
-        qerror_report_err(err);
-        error_free(err);
-        exit(1);
-    }
 
     object_property_add_link(OBJECT(dev), "parent_bus", TYPE_BUS,
                              (Object **)&dev->parent_bus, &err);