Commit 1146bec0 authored by Irui Wang's avatar Irui Wang Committed by Hans Verkuil

media: mediatek: vcodec: Fix encoder access NULL pointer

Need to set the private data with encoder device, or will access
NULL pointer in encoder handler.

Fixes: 1972e324 ("media: mediatek: vcodec: Fix possible invalid memory access for encoder")
Signed-off-by: default avatarIrui Wang <irui.wang@mediatek.com>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 6bd01c42
...@@ -138,7 +138,8 @@ int vpu_enc_init(struct venc_vpu_inst *vpu) ...@@ -138,7 +138,8 @@ int vpu_enc_init(struct venc_vpu_inst *vpu)
vpu->ctx->vpu_inst = vpu; vpu->ctx->vpu_inst = vpu;
status = mtk_vcodec_fw_ipi_register(vpu->ctx->dev->fw_handler, vpu->id, status = mtk_vcodec_fw_ipi_register(vpu->ctx->dev->fw_handler, vpu->id,
vpu_enc_ipi_handler, "venc", NULL); vpu_enc_ipi_handler, "venc",
vpu->ctx->dev);
if (status) { if (status) {
mtk_venc_err(vpu->ctx, "vpu_ipi_register fail %d", status); mtk_venc_err(vpu->ctx, "vpu_ipi_register fail %d", status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment