Skip to content

Commit

Permalink
irqchip/loongson-liointc: Fix potential dead lock
Browse files Browse the repository at this point in the history
In the function liointc_set_type(), we need to call the function
irq_gc_unlock_irqrestore() before returning.

Fixes: dbb1522 ("irqchip: Add driver for Loongson I/O Local Interrupt Controller")
Reported-by: Jianmin Lv <[email protected]>
Signed-off-by: Tiezhu Yang <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
seehearfeel authored and Marc Zyngier committed Jul 17, 2020
1 parent b10cbca commit fa03587
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/irqchip/irq-loongson-liointc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fa03587

Please sign in to comment.