CV-Bowen commented on code in PR #11483:
URL: https://github.com/apache/nuttx/pull/11483#discussion_r1442435982


##########
drivers/misc/rpmsgdev_server.c:
##########
@@ -324,15 +324,20 @@ static void rpmsgdev_poll_worker(FAR void *arg)
     container_of(fds, FAR struct rpmsgdev_device_s, fd);
   FAR struct rpmsgdev_notify_s msg;
 
-  DEBUGASSERT(dev->cfd != 0);
-
-  msg.header.command = RPMSGDEV_NOTIFY;
-  msg.revents = fds->revents;
-  msg.fds     = dev->cfd;
+  if (dev->cfd != 0)
+    {
+      msg.header.command = RPMSGDEV_NOTIFY;
+      msg.revents = fds->revents;
+      msg.fds     = dev->cfd;
 
-  fds->revents = 0;
+      fds->revents = 0;
 
-  rpmsg_send(&server->ept, &msg, sizeof(msg));
+      rpmsg_send(&server->ept, &msg, sizeof(msg));
+    }
+  else

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: [email protected]

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

Reply via email to