anchao commented on code in PR #7628:
URL: https://github.com/apache/incubator-nuttx/pull/7628#discussion_r1027311113


##########
drivers/clk/clk_rpmsg.c:
##########
@@ -485,18 +485,17 @@ static int64_t clk_rpmsg_sendrecv(FAR struct 
rpmsg_endpoint *ept,
   cookie.result  = -EIO;
 
   ret = rpmsg_send_nocopy(ept, msg, len);
-  if (ret < 0)
-    {
-      return ret;
-    }
-
-  ret = nxsem_wait_uninterruptible(&cookie.sem);
-  if (ret < 0)
+  if (ret >= 0)
     {
-      return ret;
+      ret = nxsem_wait_uninterruptible(&cookie.sem);
+      if (ret == 0)

Review Comment:
   Done



-- 
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