Skip to content

Commit 78610b8

Browse files
committed
v4l2_m2m: fix coverity issues
uninit_use Signed-off-by: niyinghao <niyinghao@xiaomi.com> Change-Id: If9a0f6b280613be967f159cc9de70b0674fd3d20
1 parent ba57594 commit 78610b8

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
@@ -374,6 +374,7 @@ static int codec_querybuf(FAR struct file *filep,
374374
return -EINVAL;
375375
}
376376

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

472+
memset(&format, 0, sizeof(format));
471473
if (V4L2_TYPE_IS_OUTPUT(buf->type))
472474
{
473475
CODEC_OUTPUT_G_FMT(cmng->codec, cfile->priv, &format);
@@ -575,6 +577,7 @@ static int codec_dqbuf(FAR struct file *filep,
575577
return -EAGAIN;
576578
}
577579

580+
memset(&format, 0, sizeof(format));
578581
if (V4L2_TYPE_IS_OUTPUT(buf->type))
579582
{
580583
CODEC_OUTPUT_G_FMT(cmng->codec, cfile->priv, &format);

0 commit comments

Comments
 (0)