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

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

commit aee7ea0d7df92672d4cf5e540f3706d02fbcfcce
Author: zhanghongyu <[email protected]>
AuthorDate: Wed Dec 3 11:18:01 2025 +0800

    net/utils: conn_dev_sem_timedwait supports the input parameter sconn being 
NULL
    
    thus supporting scenarios that only require break netdev_lock.
    
    Signed-off-by: zhanghongyu <[email protected]>
---
 net/utils/utils.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/utils/utils.h b/net/utils/utils.h
index 8acb53b3621..03fe8d15d2c 100644
--- a/net/utils/utils.h
+++ b/net/utils/utils.h
@@ -211,7 +211,8 @@ conn_dev_sem_timedwait(FAR sem_t *sem, bool interruptible,
                        unsigned int timeout, FAR struct socket_conn_s *sconn,
                        FAR struct net_driver_s *dev)
 {
-  return net_sem_timedwait2(sem, interruptible, timeout, &sconn->s_lock,
+  return net_sem_timedwait2(sem, interruptible, timeout,
+                            sconn ? &sconn->s_lock : NULL,
                             dev ? &dev->d_lock : NULL);
 }
 

Reply via email to