From 21d3d12c01f7dfcfde18e1dc9f8d0adcff586b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Wed, 1 May 2024 22:31:18 +0200 Subject: [PATCH] fix(x86_64/mmio): display initialization error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- src/arch/x86_64/kernel/mmio.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/arch/x86_64/kernel/mmio.rs b/src/arch/x86_64/kernel/mmio.rs index 9a75836b79..db2eb6b100 100644 --- a/src/arch/x86_64/kernel/mmio.rs +++ b/src/arch/x86_64/kernel/mmio.rs @@ -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");