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:
Pankaj Raghav 2022-01-27 16:33:28 +05:30 committed by Andreas Kling
parent e5a6d12ff8
commit aa832ee251

View file

@ -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()