mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
qemuDomainAttachWatchdog: Avoid unnecessary nesting
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1cf7e6ec05
commit
c5340d5420
@ -2936,17 +2936,17 @@ qemuDomainAttachWatchdog(virDomainObj *vm,
|
||||
|
||||
qemuAssignDeviceWatchdogAlias(watchdog);
|
||||
|
||||
if (watchdog->model == VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) {
|
||||
if (qemuDomainEnsurePCIAddress(vm, &dev) < 0)
|
||||
goto cleanup;
|
||||
releaseAddress = true;
|
||||
} else {
|
||||
if (watchdog->model != VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
|
||||
_("hotplug of watchdog of model %s is not supported"),
|
||||
virDomainWatchdogModelTypeToString(watchdog->model));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (qemuDomainEnsurePCIAddress(vm, &dev) < 0)
|
||||
goto cleanup;
|
||||
releaseAddress = true;
|
||||
|
||||
if (!(props = qemuBuildWatchdogDevProps(vm->def, watchdog)))
|
||||
goto cleanup;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user