Skip to content

Commit 8609d69

Browse files
committed
v4l2_m2m: fix coverity issues
CID 8306850: uninit_use Change-Id: Ic9fd562b0aacf9f7e3951e1cc4b6f03ceba2be5a Signed-off-by: niyinghao <[email protected]>
1 parent 45d912a commit 8609d69

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/video/v4l2_m2m.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ static int codec_querybuf(FAR struct file *filep,
373373
return -EINVAL;
374374
}
375375

376+
memset(&format, 0, sizeof(format));
376377
if (V4L2_TYPE_IS_OUTPUT(buf->type))
377378
{
378379
bufsize = CODEC_OUTPUT_G_BUFSIZE(cmng->codec, cfile->priv);
@@ -467,6 +468,7 @@ static int codec_qbuf(FAR struct file *filep,
467468
return -EAGAIN;
468469
}
469470

471+
memset(&format, 0, sizeof(format));
470472
if (V4L2_TYPE_IS_OUTPUT(buf->type))
471473
{
472474
CODEC_OUTPUT_G_FMT(cmng->codec, cfile->priv, &format);
@@ -569,6 +571,7 @@ static int codec_dqbuf(FAR struct file *filep,
569571
return -EAGAIN;
570572
}
571573

574+
memset(&format, 0, sizeof(format));
572575
if (V4L2_TYPE_IS_OUTPUT(buf->type))
573576
{
574577
CODEC_OUTPUT_G_FMT(cmng->codec, cfile->priv, &format);

0 commit comments

Comments
 (0)