From: David Hildenbrand <da...@redhat.com>

We can simply search for an object of our common type.

Signed-off-by: David Hildenbrand <da...@redhat.com>
Message-Id: <20180129125623.21729-4-da...@redhat.com>
Signed-off-by: Cornelia Huck <coh...@redhat.com>
---
 hw/intc/s390_flic.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
index fc244fe775..ba1aa40eba 100644
--- a/hw/intc/s390_flic.c
+++ b/hw/intc/s390_flic.c
@@ -27,11 +27,9 @@ S390FLICState *s390_get_flic(void)
     static S390FLICState *fs;
 
     if (!fs) {
-        fs = S390_FLIC_COMMON(object_resolve_path(TYPE_KVM_S390_FLIC, NULL));
-        if (!fs) {
-            fs = S390_FLIC_COMMON(object_resolve_path(TYPE_QEMU_S390_FLIC,
-                                                      NULL));
-        }
+        fs = S390_FLIC_COMMON(object_resolve_path_type("",
+                                                       TYPE_S390_FLIC_COMMON,
+                                                       NULL));
     }
     return fs;
 }
-- 
2.13.6


Reply via email to