drivers/input:Fix setting the number of keyboard driver buffers fails
Buffer nums is not multiplied by the structure size Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
This commit is contained in:
parent
a69b6846e6
commit
7dde402982
@ -123,7 +123,8 @@ static int keyboard_open(FAR struct file *filep)
|
|||||||
|
|
||||||
/* Initializes the buffer for each open file */
|
/* 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));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
kmm_free(opriv);
|
kmm_free(opriv);
|
||||||
|
Loading…
Reference in New Issue
Block a user