From 8e624ca85ab5564c82c8ec8fac7140ad3e1e9381 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 21 Nov 2024 20:40:57 +0200 Subject: [PATCH] Kernel: Don't panic if uninitialized AHCI device gets an interrupt --- kernel/kernel/Storage/ATA/AHCI/Controller.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/kernel/Storage/ATA/AHCI/Controller.cpp b/kernel/kernel/Storage/ATA/AHCI/Controller.cpp index 3b81fa3d..c5f575c0 100644 --- a/kernel/kernel/Storage/ATA/AHCI/Controller.cpp +++ b/kernel/kernel/Storage/ATA/AHCI/Controller.cpp @@ -82,8 +82,10 @@ namespace Kernel { if (is & (1 << i)) { - ASSERT(m_devices[i]); - m_devices[i]->handle_irq(); + if (m_devices[i]) + m_devices[i]->handle_irq(); + else + dwarnln("ignoring interrupt to device {}", i); } }