foc: deny irq session creation on failure
This commit is contained in:
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();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue