Remove unneeded return statements

BUG=None
TEST=bin/clippy

Change-Id: I2cf3b961baefd21fedaa6b545c1c7ecfb25a9efc
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1896088
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Daniel Verkamp 2019-10-16 13:33:27 -07:00 committed by Commit Bot
parent 0124500a28
commit a1bc67ffd7
7 changed files with 4 additions and 12 deletions

View file

@ -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]

View file

@ -142,7 +142,6 @@ impl BusDevice for Ioapic {
}
_ => {
warn!("IOAPIC: Bad write to offset {}", offset);
return;
}
}
}

View file

@ -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();
}

View file

@ -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);

View file

@ -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;
}
}
}

View file

@ -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);

View file

@ -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))
}
}