Re: [PATCH v1 1/1] regmap: irq: Get rid of duplicate check in regmap_del_irq_chip()
From: Johan Hovold
Date: Thu Oct 22 2026 - 04:14:04 EST
On Wed, Oct 21, 2026 at 10:50:35PM +0200, Andy Shevchenko wrote:
> irq_dispose_mapping() already 0-aware, so there is no need to
> perform the same test outside of the call. Get rid of duplicate
> check in regmap_del_irq_chip().
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> @@ -1039,9 +1038,7 @@ void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
> * Find the virtual irq of hwirq on chip and if it is
> * there then dispose it
> */
> - virq = irq_find_mapping(d->domain, hwirq);
> - if (virq)
> - irq_dispose_mapping(virq);
> + irq_dispose_mapping(irq_find_mapping(d->domain, hwirq));
This just makes the code less readable, and for no good reason.
Johan