mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
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: 1972e32431
("media: mediatek: vcodec: Fix possible invalid memory access for encoder")
Signed-off-by: Irui Wang <irui.wang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
6bd01c4299
commit
1146bec0ca
1 changed files with 2 additions and 1 deletions
|
@ -138,7 +138,8 @@ int vpu_enc_init(struct venc_vpu_inst *vpu)
|
|||
vpu->ctx->vpu_inst = vpu;
|
||||
|
||||
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) {
|
||||
mtk_venc_err(vpu->ctx, "vpu_ipi_register fail %d", status);
|
||||
|
|
Loading…
Reference in a new issue