drivers/video: Zero all video_framebuff_t fields in video_framebuff_init

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-12-04 22:36:26 +08:00
committed by Petro Karashchenko
parent a64c61f530
commit aa20b1e8bd
+2 -6
View File
@@ -97,12 +97,8 @@ static inline vbuf_container_t *dequeue_vbuf_unsafe(video_framebuff_t *fbuf)
void video_framebuff_init(video_framebuff_t *fbuf)
{
fbuf->mode = V4L2_BUF_MODE_RING;
fbuf->vbuf_empty = NULL;
fbuf->vbuf_top = NULL;
fbuf->vbuf_tail = NULL;
fbuf->vbuf_next = NULL;
memset(fbuf, 0, sizeof(video_framebuff_t));
fbuf->mode = V4L2_BUF_MODE_RING;
nxmutex_init(&fbuf->lock_empty);
}