From: Yunfei Dong Date: Fri, 6 Sep 2019 11:55:01 +0000 (-0300) Subject: media: mtk-vcodec: vdec: fix incorrect pointer dereference X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=dda8415e17c99ad3d6ac56d8aa722198f816fc74;p=android-x86%2Fkernel.git 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 Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- 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; }