mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 06:42:32 +08:00
boards: enter/leave critical section should in pairs
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
committed by
Masayuki Ishikawa
parent
52235b468b
commit
624d69ee05
@@ -149,6 +149,7 @@ int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
leave_critical_section(flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -161,6 +162,7 @@ int board_button_irq(int id, xcpt_t irqhandler, void *arg)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
leave_critical_section(flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -256,6 +256,7 @@ static int gpint_attach(struct gpio_dev_s *dev, pin_interrupt_t callback)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
leave_critical_section(flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -291,6 +292,7 @@ static int gpint_enable(struct gpio_dev_s *dev, bool enable)
|
||||
&gpio_irqnum);
|
||||
if (ret < 0)
|
||||
{
|
||||
leave_critical_section(flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user