qdev: change ambiguous qdev names

Reported-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/qom/object.c b/qom/object.c
index ef37e08..a12895f 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -87,6 +87,11 @@
 
     g_assert(info->name != NULL);
 
+    if (type_table_lookup(info->name) != NULL) {
+        fprintf(stderr, "Registering `%s' which already exists\n", info->name);
+        abort();
+    }
+
     ti->name = g_strdup(info->name);
     ti->parent = g_strdup(info->parent);