FAILED: Patch "media: mediatek: encoder: Fix uninitialized scalar variable issue" failed to apply to 6.12-stable tree
Subsystems (4)
Sasha Levin
maintainerThe patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 88e935de7cf8795d7a6a51385db87ecb361a7050 Mon Sep 17 00:00:00 2001
From: Irui Wang <[email protected]>
Date: Sun, 7 Sep 2025 17:35:56 +0800
Subject: [PATCH] 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.
--- .../media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c +3 -3
@@ -850,7 +850,7 @@ static void vb2ops_venc_buf_queue(struct vb2_buffer *vb)static int vb2ops_venc_start_streaming (struct vb2_queue *q,unsigned int count) {struct mtk_vcodec_enc_ctx *ctx =vb2_get_drv_priv (q); -struct venc_enc_param param; +struct venc_enc_param param = { };int ret;int i;
@@ -1004,7 +1004,7 @@ static int mtk_venc_encode_header(void *priv)int ret;struct vb2_v4l2_buffer *src_buf, *dst_buf;struct mtk_vcodec_mem bs_buf; -struct venc_done_result enc_result; +struct venc_done_result enc_result = { }; dst_buf =v4l2_m2m_dst_buf_remove (ctx->m2m_ctx);if (!dst_buf) {
@@ -1125,7 +1125,7 @@ static void mtk_venc_worker(struct work_struct *work)struct vb2_v4l2_buffer *src_buf, *dst_buf;struct venc_frm_buf frm_buf;struct mtk_vcodec_mem bs_buf; -struct venc_done_result enc_result; +struct venc_done_result enc_result = { };int ret, i;/* check dst_buf, dst_buf may be removed in device_run
Signature · 1 line
2.51.0