mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +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
Notes:
sideshowbarker
2024-07-17 19:52:55 +09:00
Author: https://github.com/Panky-codes
Commit: aa832ee251
Pull-request: https://github.com/SerenityOS/serenity/pull/12161
Reviewed-by: https://github.com/tomuta ✅
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