irqchip/imx-intmux: Handle pure domain searches correctly
authorThomas Gleixner <tglx@linutronix.de>
Tue, 20 Feb 2024 08:46:19 +0000 (09:46 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 20 Feb 2024 16:30:57 +0000 (17:30 +0100)
The removal of the paremeter count restriction in the core code to allow
pure domain token based select() decisions broke the IMX intmux select
callback as that unconditioally expects that there is a parameter.

Add the missing check for zero parameter count and the token match.

Fixes: de1ff306dcf4 ("genirq/irqdomain: Remove the param count restriction from select()")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/87ttm3ikok.ffs@tglx
drivers/irqchip/irq-imx-intmux.c

index aa041e4dfee0916659358687e8e9cdf857828d0d..65084c7619b0a5634069878a487fb6e2b9a09827 100644 (file)
@@ -166,6 +166,10 @@ static int imx_intmux_irq_select(struct irq_domain *d, struct irq_fwspec *fwspec
        if (fwspec->fwnode != d->fwnode)
                return false;
 
+       /* Handle pure domain searches */
+       if (!fwspec->param_count)
+               return d->bus_token == bus_token;
+
        return irqchip_data->chanidx == fwspec->param[1];
 }