risc-v/espressif: Panic if CPU interrupt allocation fails

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei 2023-04-03 15:43:04 -03:00 committed by Alan Carvalho de Assis
parent 7aecd751f0
commit 8be8aab9bb
3 changed files with 4 additions and 11 deletions

View File

@ -422,8 +422,7 @@ void esp_route_intr(int source, int cpuint, irq_priority_t priority,
* type - Interrupt trigger type.
*
* Returned Value:
* The allocated CPU interrupt on success, a negated errno value on
* failure.
* Allocated CPU interrupt.
*
****************************************************************************/
@ -449,11 +448,10 @@ int esp_setup_irq(int source, irq_priority_t priority, irq_trigger_t type)
cpuint = esp_cpuint_alloc(irq);
if (cpuint < 0)
{
irqerr("Unable to allocate CPU interrupt for priority=%d and type=%d",
_alert("Unable to allocate CPU interrupt for source=%d\n",
priority, type);
leave_critical_section(irqstate);
return cpuint;
PANIC();
}
esp_route_intr(source, cpuint, priority, type);

View File

@ -115,8 +115,7 @@ void esp_route_intr(int source, int cpuint, irq_priority_t priority,
* type - Interrupt trigger type.
*
* Returned Value:
* The allocated CPU interrupt on success, a negated errno value on
* failure.
* Allocated CPU interrupt.
*
****************************************************************************/

View File

@ -493,10 +493,6 @@ static int esp_attach(uart_dev_t *dev)
priv->cpuint = esp_setup_irq(priv->source, priv->int_pri,
ESP_IRQ_TRIGGER_LEVEL);
if (priv->cpuint < 0)
{
return priv->cpuint;
}
/* Attach and enable the IRQ */