diff options
author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2020-07-07 10:12:51 +0800 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-07-17 13:41:42 +0100 |
commit | fa03587cad9bd32aa552377de4f05c50181a35a8 (patch) | |
tree | 474c363c933453b342f03d323c2133f830be854d /drivers/irqchip | |
parent | b10cbca8f03dd10dc241395a639d488f4144e986 (diff) |
irqchip/loongson-liointc: Fix potential dead lock
In the function liointc_set_type(), we need to call the function
irq_gc_unlock_irqrestore() before returning.
Fixes: dbb152267908 ("irqchip: Add driver for Loongson I/O Local Interrupt Controller")
Reported-by: Jianmin Lv <lvjianmin@loongson.cn>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1594087972-21715-8-git-send-email-yangtiezhu@loongson.cn
Diffstat (limited to 'drivers/irqchip')
-rw-r--r-- | drivers/irqchip/irq-loongson-liointc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c index 63b61474a0cc..6ef86a334c62 100644 --- a/drivers/irqchip/irq-loongson-liointc.c +++ b/drivers/irqchip/irq-loongson-liointc.c @@ -114,6 +114,7 @@ static int liointc_set_type(struct irq_data *data, unsigned int type) liointc_set_bit(gc, LIOINTC_REG_INTC_POL, mask, false); break; default: + irq_gc_unlock_irqrestore(gc, flags); return -EINVAL; } irq_gc_unlock_irqrestore(gc, flags); |