anchao commented on code in PR #10163:
URL: https://github.com/apache/nuttx/pull/10163#discussion_r1290865713


##########
drivers/input/keyboard_upper.c:
##########
@@ -123,7 +123,8 @@ static int keyboard_open(FAR struct file *filep)
 
   /* Initializes the buffer for each open file */
 
-  ret = circbuf_init(&opriv->circ, NULL, upper->nums);
+  ret = circbuf_init(&opriv->circ, NULL,
+                     upper->nums * sizeof(struct keyboard_event_s));

Review Comment:
   circbuf still needs to be released in failure case



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