Skip to content

Commit

Permalink
fix(x86_64/mmio): display initialization error
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed May 1, 2024
1 parent 060548d commit 21d3d12
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/arch/x86_64/kernel/mmio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,11 @@ pub(crate) fn init_drivers() {
"Found MMIO device, but we guess the interrupt number {}!",
irq
);
if let Ok(VirtioDriver::Network(drv)) = mmio_virtio::init_device(mmio, irq) {
register_driver(MmioDriver::VirtioNet(InterruptTicketMutex::new(drv)))
match mmio_virtio::init_device(mmio, irq) {
Ok(VirtioDriver::Network(drv)) => {
register_driver(MmioDriver::VirtioNet(InterruptTicketMutex::new(drv)))
}
Err(err) => error!("Could not initialize virtio-mmio device: {err}"),
}
} else {
warn!("Unable to find mmio device");
Expand Down

0 comments on commit 21d3d12

Please sign in to comment.