summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYunfei Dong <yunfei.dong@mediatek.com>2019-09-06 13:55:01 +0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-10-01 21:44:57 +0200
commitdda8415e17c99ad3d6ac56d8aa722198f816fc74 (patch)
treeebd266e9ff27c70d50d5dc089852baceacc91eec
parentmedia: em28xx: make various arrays static const, makes object smaller (diff)
downloadlinux-dda8415e17c99ad3d6ac56d8aa722198f816fc74.tar.xz
linux-dda8415e17c99ad3d6ac56d8aa722198f816fc74.zip
media: mtk-vcodec: vdec: fix incorrect pointer dereference
mtk_q_data::fmt is actually a pointer and must be dereferenced as such. This went under the radar because mtk_v4l2_debug() evaluates to nothing unless DEBUG is defined. [acourbot: split into its own commit] Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> Signed-off-by: Alexandre Courbot <acourbot@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r--drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
index 26a55c3e807e..653f111532ab 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
@@ -284,7 +284,7 @@ static void mtk_vdec_update_fmt(struct mtk_vcodec_ctx *ctx,
fmt = &mtk_video_formats[k];
if (fmt->fourcc == pixelformat) {
mtk_v4l2_debug(1, "Update cap fourcc(%d -> %d)",
- dst_q_data->fmt.fourcc, pixelformat);
+ dst_q_data->fmt->fourcc, pixelformat);
dst_q_data->fmt = fmt;
return;
}