mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-23 02:55:15 +00:00
Kernel: Add conditional call to disable_irq in IRQHandler constructor
There is no use in calling disable_irq function in the IRQHandler constructor if irq was not registered before. So add a condition where we call disable_irq only if the irq was registered before.
This commit is contained in:
parent
e5a6d12ff8
commit
aa832ee251
|
@ -15,7 +15,8 @@ IRQHandler::IRQHandler(u8 irq)
|
|||
: GenericInterruptHandler(irq)
|
||||
, m_responsible_irq_controller(InterruptManagement::the().get_responsible_irq_controller(irq))
|
||||
{
|
||||
disable_irq();
|
||||
if (is_registered())
|
||||
disable_irq();
|
||||
}
|
||||
|
||||
IRQHandler::~IRQHandler()
|
||||
|
|
Loading…
Reference in a new issue