xiaoxiang781216 commented on a change in pull request #4833:
URL: https://github.com/apache/incubator-nuttx/pull/4833#discussion_r750869953



##########
File path: drivers/motor/foc/foc_dev.c
##########
@@ -862,19 +830,14 @@ int foc_register(FAR const char *path, FAR struct 
foc_dev_s *dev)
   if (dev->devno > CONFIG_MOTOR_FOC_INST)
     {
       mtrerr("Unsupported foc devno %d\n\n", dev->devno);
-      set_errno(EINVAL);
-      ret = ERROR;
+      ret = -EINVAL;
       goto errout;
     }
 
   /* Reset counter */
 
   dev->ocount = 0;
 
-  /* Store device number */
-
-  dev->devno = g_devno_cntr;

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