mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
STM32 and STM32L4 Oneshot: EBUSY is more appropriate error then ENOMEM
This commit is contained in:
@@ -264,7 +264,7 @@ static int stm32_oneshot8_handler(int irq, void *context)
|
||||
static inline int stm32_allocate_handler(struct stm32_oneshot_s *oneshot)
|
||||
{
|
||||
#if CONFIG_STM32_ONESHOT_MAXTIMERS > 1
|
||||
int ret = -ENOMEM;
|
||||
int ret = -EBUSY;
|
||||
int i;
|
||||
|
||||
/* Search for an unused handler */
|
||||
@@ -295,7 +295,7 @@ static inline int stm32_allocate_handler(struct stm32_oneshot_s *oneshot)
|
||||
return OK;
|
||||
}
|
||||
|
||||
return -ENOMEM;
|
||||
return -EBUSY;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ static int stm32l4_oneshot8_handler(int irq, void *context)
|
||||
static inline int stm32l4_allocate_handler(struct stm32l4_oneshot_s *oneshot)
|
||||
{
|
||||
#if CONFIG_STM32L4_ONESHOT_MAXTIMERS > 1
|
||||
int ret = -ENOMEM;
|
||||
int ret = -EBUSY;
|
||||
int i;
|
||||
|
||||
/* Search for an unused handler */
|
||||
@@ -296,7 +296,7 @@ static inline int stm32l4_allocate_handler(struct stm32l4_oneshot_s *oneshot)
|
||||
return OK;
|
||||
}
|
||||
|
||||
return -ENOMEM;
|
||||
return -EBUSY;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user