qemu: eliminate ret variable in qemuExtTPMStart

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Ján Tomko 2020-01-24 19:36:26 +01:00
parent 06160f6708
commit f84c7c67d5

View File

@ -865,19 +865,18 @@ qemuExtTPMStart(virQEMUDriverPtr driver,
virDomainObjPtr vm,
bool incomingMigration)
{
int ret = 0;
virDomainTPMDefPtr tpm = vm->def->tpm;
switch (tpm->type) {
case VIR_DOMAIN_TPM_TYPE_EMULATOR:
ret = qemuExtTPMStartEmulator(driver, vm, incomingMigration);
break;
return qemuExtTPMStartEmulator(driver, vm, incomingMigration);
case VIR_DOMAIN_TPM_TYPE_PASSTHROUGH:
case VIR_DOMAIN_TPM_TYPE_LAST:
break;
}
return ret;
return 0;
}