mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:37:43 +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
1 changed files with 2 additions and 1 deletions
|
@ -15,7 +15,8 @@ IRQHandler::IRQHandler(u8 irq)
|
||||||
: GenericInterruptHandler(irq)
|
: GenericInterruptHandler(irq)
|
||||||
, m_responsible_irq_controller(InterruptManagement::the().get_responsible_irq_controller(irq))
|
, m_responsible_irq_controller(InterruptManagement::the().get_responsible_irq_controller(irq))
|
||||||
{
|
{
|
||||||
disable_irq();
|
if (is_registered())
|
||||||
|
disable_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
IRQHandler::~IRQHandler()
|
IRQHandler::~IRQHandler()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue