irq_ctrl: Fix interrupt name getter
When this function was changed to support multiple CPUs, the check of the interrupt being number being valid was not updated, which resulted in it thinking too often the interrupt was out of range, and returning NULL as the interrupt name string. Fix it. This bug only affected debug logs, typically with verbosity set relatively high. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
b9e1f00fcf
commit
a715dcc179
|
@ -449,7 +449,7 @@ const char *hw_irq_ctrl_get_name(unsigned int inst, unsigned int irq)
|
|||
{
|
||||
static const char *irqnames[NHW_INTCTRL_TOTAL_INST][NHW_INTCTRL_MAX_INTLINES] = NHW_INT_NAMES;
|
||||
|
||||
if (irq < sizeof(irqnames)/sizeof(irqnames[0])) {
|
||||
if ((inst < NHW_INTCTRL_TOTAL_INST) && (irq < NHW_INTCTRL_MAX_INTLINES)) {
|
||||
return irqnames[inst][irq];
|
||||
} else {
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue