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(a)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 516ae7e444..bc455e7da3 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -7213,7 +7213,7 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
if ((ret = qemuDomainDeviceDefValidateAddress(dev, qemuCaps)) < 0)
return ret;
- if (virDomainCapsDeviceDefValidate(domCaps, dev, def) < 0)
+ if ((ret = virDomainCapsDeviceDefValidate(domCaps, dev, def)) < 0)
return ret;
switch ((virDomainDeviceType)dev->type) {
--
2.21.0