xiaoxiang781216 commented on code in PR #17531:
URL: https://github.com/apache/nuttx/pull/17531#discussion_r2670766620


##########
drivers/timers/timer.c:
##########
@@ -150,11 +150,7 @@ static int timer_open(FAR struct file *filep)
 
   /* Get exclusive access to the device structures */
 
-  ret = nxmutex_lock(&upper->lock);
-  if (ret < 0)
-    {
-      goto errout;
-    }
+  nxmutex_lock(&upper->lock);

Review Comment:
   > I think it is better to keep the error checking and add a "tmrerr()" to 
report that the lock failed for some reason (print the return error). 
nxmutex_lock() can fail if interrupted by a signal, if the lock parameter is 
invalid, etc.
   > 
   
    but signal can't interrupt mutex



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to