]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: mediatek: encoder: Fix uninitialized scalar variable issue
authorIrui Wang <irui.wang@mediatek.com>
Sun, 7 Sep 2025 09:35:56 +0000 (17:35 +0800)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 5 Jan 2026 14:56:31 +0000 (15:56 +0100)
commit88e935de7cf8795d7a6a51385db87ecb361a7050
tree31af27e603993af0a243427d87c8d2456cf156b4
parent17e1e1641f74a89824d4de3aa38c78daa5686cc1
media: mediatek: encoder: Fix uninitialized scalar variable issue

UNINIT checker finds some instances of variables that are used
without being initialized, for example using the uninitialized
value enc_result.is_key_frm can result in unpredictable behavior,
so initialize these variables after declaring.

Fixes: 4e855a6efa54 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver")
Cc: stable@vger.kernel.org
Signed-off-by: Irui Wang <irui.wang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c