diff --git a/arch/arm/src/stm32/stm32_oneshot.c b/arch/arm/src/stm32/stm32_oneshot.c index 007f833baad..92f57e928cc 100644 --- a/arch/arm/src/stm32/stm32_oneshot.c +++ b/arch/arm/src/stm32/stm32_oneshot.c @@ -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 } diff --git a/arch/arm/src/stm32l4/stm32l4_oneshot.c b/arch/arm/src/stm32l4/stm32l4_oneshot.c index 3c65866cd57..7dbfcf126ca 100644 --- a/arch/arm/src/stm32l4/stm32l4_oneshot.c +++ b/arch/arm/src/stm32l4/stm32l4_oneshot.c @@ -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 }