--- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -2735,8 +2735,10 @@ int irq_set_irqchip_state(unsigned int i do { chip = irq_data_get_irq_chip(data); - if (WARN_ON_ONCE(!chip)) - return -ENODEV; + if (WARN_ON_ONCE(!chip)) { + err = -ENODEV; + goto out_unlock; + } if (chip->irq_set_irqchip_state) break; #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY @@ -2749,6 +2751,7 @@ int irq_set_irqchip_state(unsigned int i if (data) err = chip->irq_set_irqchip_state(data, which, val); +out_unlock: irq_put_desc_busunlock(desc, flags); return err; }