[PATCH] irqchip/imx-irqsteer: Fix irq handling if an error occurs in imx_irqsteer_irq_handler()

Christophe JAILLET christophe.jaillet at wanadoo.fr
Sat Jul 12 02:58:35 PDT 2025


Le 17/11/2024 à 12:21, Christophe JAILLET a écrit :
> chained_irq_enter(() should be paired with a corresponding
> chained_irq_exit().
> 
> Here, if (hwirq < 0), a early return occurs and chained_irq_exit() is not
> called.

After several month without any feedback, this is a polite ping.
Is this patch correct?

CJ


> 
> Add a new label and a goto for fix it.
> 
> Fixes: 28528fca4908 ("irqchip/imx-irqsteer: Add multi output interrupts support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>
> ---
> Compile tested only.
> 
> Review with care, irq handling is sometimes tricky...
> ---
>   drivers/irqchip/irq-imx-irqsteer.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-irqsteer.c
> index 75a0e980ff35..59abe5a8beb8 100644
> --- a/drivers/irqchip/irq-imx-irqsteer.c
> +++ b/drivers/irqchip/irq-imx-irqsteer.c
> @@ -135,7 +135,7 @@ static void imx_irqsteer_irq_handler(struct irq_desc *desc)
>   	if (hwirq < 0) {
>   		pr_warn("%s: unable to get hwirq base for irq %d\n",
>   			__func__, irq);
> -		return;
> +		goto out;
>   	}
>   
>   	for (i = 0; i < 2; i++, hwirq += 32) {
> @@ -153,6 +153,7 @@ static void imx_irqsteer_irq_handler(struct irq_desc *desc)
>   			generic_handle_domain_irq(data->domain, pos + hwirq);
>   	}
>   
> +out:
>   	chained_irq_exit(irq_desc_get_chip(desc), desc);
>   }
>   




More information about the linux-arm-kernel mailing list