When the virDomainCapsDeviceDefValidate() function returned an error
status (-1), we were aborting the function early, but returning the
default return value (0). This patch properly returns an error in that
case.
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
---
src/qemu/qemu_domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 09b6c9a570..92a0df2d75 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -7211,7 +7211,7 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
if ((ret = qemuDomainDeviceDefValidateAddress(dev, qemuCaps)) < 0)
goto cleanup;
- if (virDomainCapsDeviceDefValidate(domCaps, dev, def) < 0)
+ if ((ret = virDomainCapsDeviceDefValidate(domCaps, dev, def)) < 0)
goto cleanup;
switch ((virDomainDeviceType)dev->type) {
--
2.21.0
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list