Re: [PATCH 3/3] qemu_validate: Fix how qemuValidateDomainDeviceDefZPCIAddress() is called

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2020-06-29 at 09:43 +0200, Michal Privoznik wrote:
> +++ b/src/qemu/qemu_validate.c
> @@ -1063,7 +1063,8 @@ 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;

There needs to be a 'break' after the 'if', otherwise on success this
case will fall through to the next case, which is not what we want.

With that added,

  Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx>

and safe for freeze.

-- 
Andrea Bolognani / Red Hat / Virtualization




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux