From: Michal Privoznik Date: Sat, 27 Jun 2020 08:49:37 +0000 (+0200) Subject: qemu_validate: Fix how qemuValidateDomainDeviceDefZPCIAddress() is called X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=90c9b90aee03fbde20a2bf8118e94fa73145e757;p=libvirt.git qemu_validate: Fix how qemuValidateDomainDeviceDefZPCIAddress() is called To make the code future proof, the rest of the qemuValidateDomainDeviceDefAddress() has to be executed (even though there is nothing there yet) instead of returning directly. Signed-off-by: Michal Privoznik Reviewed-by: Andrea Bolognani --- diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 78efa68584..6d0ffd2013 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1057,7 +1057,9 @@ qemuValidateDomainDeviceDefAddress(const virDomainDeviceDef *dev, switch ((virDomainDeviceAddressType) info->type) { case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI: - return qemuValidateDomainDeviceDefZPCIAddress(info, qemuCaps); + if (qemuValidateDomainDeviceDefZPCIAddress(info, qemuCaps) < 0) + return -1; + break; case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE: /* Address validation might happen before we have had a chance to