summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--crosvm_plugin/src/lib.rs2
-rw-r--r--devices/src/ioapic.rs1
-rw-r--r--devices/src/usb/xhci/xhci_controller.rs5
-rw-r--r--devices/src/virtio/balloon.rs1
-rw-r--r--devices/src/virtio/input/mod.rs2
-rw-r--r--devices/src/virtio/tpm.rs1
-rw-r--r--qcow/src/qcow.rs4
7 files changed, 4 insertions, 12 deletions
diff --git a/crosvm_plugin/src/lib.rs b/crosvm_plugin/src/lib.rs
index 53a8569..eb30e4b 100644
--- a/crosvm_plugin/src/lib.rs
+++ b/crosvm_plugin/src/lib.rs
@@ -1478,7 +1478,7 @@ pub unsafe extern "C" fn crosvm_set_hypercall_hint(
         hint.address_flags == CROSVM_HINT_ON_WRITE,
         slice::from_raw_parts(hint.details, hint.details_count as usize),
     );
-    return to_crosvm_rc(ret);
+    to_crosvm_rc(ret)
 }
 
 #[no_mangle]
diff --git a/devices/src/ioapic.rs b/devices/src/ioapic.rs
index ce9f2b2..5f8270c 100644
--- a/devices/src/ioapic.rs
+++ b/devices/src/ioapic.rs
@@ -142,7 +142,6 @@ impl BusDevice for Ioapic {
             }
             _ => {
                 warn!("IOAPIC: Bad write to offset {}", offset);
-                return;
             }
         }
     }
diff --git a/devices/src/usb/xhci/xhci_controller.rs b/devices/src/usb/xhci/xhci_controller.rs
index 78022d3..5db31ef 100644
--- a/devices/src/usb/xhci/xhci_controller.rs
+++ b/devices/src/usb/xhci/xhci_controller.rs
@@ -158,7 +158,6 @@ impl XhciController {
             }
             _ => {
                 error!("xhci controller is in a wrong state");
-                return;
             }
         }
     }
@@ -201,7 +200,6 @@ impl PciDevice for XhciController {
             }
             _ => {
                 error!("xhci controller is in a wrong state");
-                return;
             }
         }
     }
@@ -254,7 +252,6 @@ impl PciDevice for XhciController {
             }
             _ => {
                 error!("xhci controller is in a wrong state");
-                return;
             }
         }
     }
@@ -274,10 +271,10 @@ impl PciDevice for XhciController {
             }
             _ => {
                 error!("xhci controller is in a wrong state");
-                return;
             }
         }
     }
+
     fn on_device_sandboxed(&mut self) {
         self.init_when_forked();
     }
diff --git a/devices/src/virtio/balloon.rs b/devices/src/virtio/balloon.rs
index eef70fb..c93d60b 100644
--- a/devices/src/virtio/balloon.rs
+++ b/devices/src/virtio/balloon.rs
@@ -364,7 +364,6 @@ impl VirtioDevice for Balloon {
         match worker_result {
             Err(e) => {
                 error!("failed to spawn virtio_balloon worker: {}", e);
-                return;
             }
             Ok(join_handle) => {
                 self.worker_thread = Some(join_handle);
diff --git a/devices/src/virtio/input/mod.rs b/devices/src/virtio/input/mod.rs
index a4561e5..664f121 100644
--- a/devices/src/virtio/input/mod.rs
+++ b/devices/src/virtio/input/mod.rs
@@ -656,7 +656,6 @@ where
             match worker_result {
                 Err(e) => {
                     error!("failed to spawn virtio_input worker: {}", e);
-                    return;
                 }
                 Ok(join_handle) => {
                     self.worker_thread = Some(join_handle);
@@ -664,7 +663,6 @@ where
             }
         } else {
             error!("tried to activate device without a source for events");
-            return;
         }
     }
 }
diff --git a/devices/src/virtio/tpm.rs b/devices/src/virtio/tpm.rs
index 22d39a2..abad4e2 100644
--- a/devices/src/virtio/tpm.rs
+++ b/devices/src/virtio/tpm.rs
@@ -257,7 +257,6 @@ impl VirtioDevice for Tpm {
         match worker_result {
             Err(e) => {
                 error!("vtpm failed to spawn virtio_tpm worker: {}", e);
-                return;
             }
             Ok(join_handle) => {
                 self.worker_thread = Some(join_handle);
diff --git a/qcow/src/qcow.rs b/qcow/src/qcow.rs
index 19ed922..34a54f0 100644
--- a/qcow/src/qcow.rs
+++ b/qcow/src/qcow.rs
@@ -1060,10 +1060,10 @@ impl QcowFile {
 
         let max_valid_cluster_offset = self.refcounts.max_valid_cluster_offset();
         if let Some(new_cluster) = self.raw_file.add_cluster_end(max_valid_cluster_offset)? {
-            return Ok(new_cluster);
+            Ok(new_cluster)
         } else {
             error!("No free clusters in get_new_cluster()");
-            return Err(std::io::Error::from_raw_os_error(ENOSPC));
+            Err(std::io::Error::from_raw_os_error(ENOSPC))
         }
     }