pkarashchenko commented on code in PR #7032:
URL: https://github.com/apache/incubator-nuttx/pull/7032#discussion_r965183110


##########
drivers/ipcc/ipcc_read.c:
##########
@@ -230,20 +230,22 @@ ssize_t ipcc_read(FAR struct file *filep, FAR char 
*buffer,
         }
 
       /* We are in blocking mode, so we have to wait for data to arrive.
-       * nxsem_wait() will atomically leave critical section for us so
-       * we don't have to do it.
        */
 
       nxsem_post(&priv->exclsem);
       if ((ret = nxsem_wait(&priv->rxsem)))
         {
+          leave_critical_section(flags);
+
           /* We were interrupted by signal, but we have not written
            * any data to caller's buffer, so we return with error
            */
 
           return ret;
         }
 
+      leave_critical_section(flags);

Review Comment:
   ditto



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to