diff --git a/pci/src/vfio_user.rs b/pci/src/vfio_user.rs index 10d00c7e8..301634dd7 100644 --- a/pci/src/vfio_user.rs +++ b/pci/src/vfio_user.rs @@ -624,10 +624,10 @@ impl ExternalDmaMapping for VfioUserDmaMappi ) }) } else { - return Err(std::io::Error::new( + Err(std::io::Error::new( std::io::ErrorKind::Other, format!("Region not found for 0x{:x}", gpa), - )); + )) } } diff --git a/vmm/src/gdb.rs b/vmm/src/gdb.rs index cf1c01f0c..440362f69 100644 --- a/vmm/src/gdb.rs +++ b/vmm/src/gdb.rs @@ -363,9 +363,7 @@ impl MultiThreadSingleStep for GdbStub { } match self.vm_request(GdbRequestPayload::Resume, tid_to_cpuid(tid)) { Ok(_) => Ok(()), - Err(e) => { - return Err(format!("Failed to resume the target: {:?}", e)); - } + Err(e) => Err(format!("Failed to resume the target: {:?}", e)), } } }