[PATCH v1 1/1] regmap: irq: Get rid of duplicate check in regmap_del_irq_chip()

From: Andy Shevchenko

Date: Wed Oct 21 2026 - 16:54:58 EST


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>
---
drivers/base/regmap/regmap-irq.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 715eb9e7aa2a..bd7c89618dd7 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -1021,7 +1021,6 @@ EXPORT_SYMBOL_GPL(regmap_add_irq_chip);
*/
void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *d)
{
- unsigned int virq;
int i, hwirq;

if (!d)
@@ -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));
}

irq_domain_remove(d->domain);
--
2.50.1