summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-loongson-liointc.c
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2020-07-07 05:12:51 +0300
committerMarc Zyngier <maz@kernel.org>2020-07-17 15:41:42 +0300
commitfa03587cad9bd32aa552377de4f05c50181a35a8 (patch)
tree474c363c933453b342f03d323c2133f830be854d /drivers/irqchip/irq-loongson-liointc.c
parentb10cbca8f03dd10dc241395a639d488f4144e986 (diff)
downloadlinux-fa03587cad9bd32aa552377de4f05c50181a35a8.tar.xz
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/irq-loongson-liointc.c')
-rw-r--r--drivers/irqchip/irq-loongson-liointc.c1
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);