STM32 and STM32L4 Oneshot: EBUSY is more appropriate error then ENOMEM

This commit is contained in:
Gregory Nutt
2017-01-18 16:20:15 -06:00
parent cf4b82dcdd
commit 0c0c98691e
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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
}
+2 -2
View File
@@ -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
}