This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 5a22ad4dbb6eeac637ae1ddaef8d0e8000541032
Author: fangpeina <[email protected]>
AuthorDate: Wed Jul 23 21:44:09 2025 +0800

    drivers/timers: use DEBUGASSERT check abnormal values
    
    use DEBUGASSERT to check abnormal values in drivers/timers.c
    
    Signed-off-by: fangpeina <[email protected]>
---
 drivers/timers/timer.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/timers/timer.c b/drivers/timers/timer.c
index 365c5099d9a..1318fc79714 100644
--- a/drivers/timers/timer.c
+++ b/drivers/timers/timer.c
@@ -411,10 +411,7 @@ static int timer_poll(FAR struct file *filep,
   irqstate_t flags;
   int ret = OK;
 
-  if (upper == NULL || fds == NULL)
-    {
-      return -EINVAL;
-    }
+  DEBUGASSERT(upper != NULL && fds != NULL);
 
   flags = enter_critical_section();
 

Reply via email to