mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
foc: deny irq session creation on failure
This commit is contained in:
committed by
Christian Helmuth
parent
a7eb347ce2
commit
2ec48c32cb
@@ -199,8 +199,18 @@ Irq_session_component::Irq_session_component(Range_allocator *irq_alloc,
|
||||
}
|
||||
|
||||
Irq_args const irq_args(args);
|
||||
_irq_object.associate(_irq_number, msi, irq_args.trigger(),
|
||||
irq_args.polarity());
|
||||
if (_irq_object.associate(_irq_number, msi, irq_args.trigger(),
|
||||
irq_args.polarity()))
|
||||
return;
|
||||
|
||||
/* cleanup */
|
||||
if (msi)
|
||||
msi_alloc.clear(_irq_number, 1);
|
||||
else {
|
||||
addr_t const free_irq = _irq_number;
|
||||
_irq_alloc->free((void *)free_irq);
|
||||
}
|
||||
throw Service_denied();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user