vmm: Simplify return path of vm_boot

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-02-15 13:59:05 +00:00 committed by Samuel Ortiz
parent 29881a2d6a
commit 707bb0ba72

View File

@ -503,12 +503,10 @@ impl Vmm {
// Then we start the new VM.
if let Some(ref mut vm) = self.vm {
vm.boot()?;
vm.boot()
} else {
return Err(VmError::VmNotCreated);
Err(VmError::VmNotCreated)
}
Ok(())
}
fn vm_info(&self) -> result::Result<VmInfo, VmError> {