diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 470d342afc6f676c01c1219797d07a1f2a055b1f..5b323d26c4af6d6ff3cb3ff80539ade004e566ef 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -7914,19 +7914,18 @@ static int qemuDomainDefaultVideoDevice(const virDomainDef *def, virQEMUCapsPtr qemuCaps) { - if (ARCH_IS_PPC64(def->os.arch)) { + if (ARCH_IS_PPC64(def->os.arch)) return VIR_DOMAIN_VIDEO_TYPE_VGA; - } else if (qemuDomainIsARMVirt(def) || - qemuDomainIsRISCVVirt(def) || - ARCH_IS_S390(def->os.arch)) { + if (qemuDomainIsARMVirt(def) || + qemuDomainIsRISCVVirt(def) || + ARCH_IS_S390(def->os.arch)) { return VIR_DOMAIN_VIDEO_TYPE_VIRTIO; - } else { - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_CIRRUS_VGA)) - return VIR_DOMAIN_VIDEO_TYPE_CIRRUS; - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VGA)) - return VIR_DOMAIN_VIDEO_TYPE_VGA; - return VIR_DOMAIN_VIDEO_TYPE_DEFAULT; } + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_CIRRUS_VGA)) + return VIR_DOMAIN_VIDEO_TYPE_CIRRUS; + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VGA)) + return VIR_DOMAIN_VIDEO_TYPE_VGA; + return VIR_DOMAIN_VIDEO_TYPE_DEFAULT; }