From 5c487eacb7e260498e4a7e25380cbbb2728f80c2 Mon Sep 17 00:00:00 2001 From: Nathan Royer Date: Tue, 21 Nov 2023 20:44:04 +0100 Subject: [PATCH] Merge fixes --- kernel/interrupts/src/aarch64/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/interrupts/src/aarch64/mod.rs b/kernel/interrupts/src/aarch64/mod.rs index abf2d85b33..5521d1c0a5 100644 --- a/kernel/interrupts/src/aarch64/mod.rs +++ b/kernel/interrupts/src/aarch64/mod.rs @@ -218,12 +218,13 @@ pub fn init_pl011_rx_interrupt() -> Result<(), &'static str> { } pub fn init_pci_interrupts(handler: InterruptHandler) -> Result<(), &'static str> { - let int_ctrl = SystemInterruptController::get(); + let int_ctrl = SystemInterruptController::get() + .ok_or("SystemInterruptController was not yet initialized")?; let dst = Some(cpu::bootstrap_cpu().unwrap()); for int_num in BOARD_CONFIG.pci_intx { if let Err(existing_handler) = register_interrupt(int_num, handler) { - if handler as *const InterruptHandler != existing_handler { + if handler as InterruptHandler != existing_handler { return Err("A different interrupt handler has already been setup for that IPI"); } }