Commit 4397efeb authored by Zhang Changzhong's avatar Zhang Changzhong Committed by Mauro Carvalho Chehab

media: mtk-vcodec: fix error return code in vdec_vp9_decode()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: dea42fb7 ("media: mtk-vcodec: reset segment data then trig decoder")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent d7a7d721
...@@ -890,7 +890,8 @@ static int vdec_vp9_decode(void *h_vdec, struct mtk_vcodec_mem *bs, ...@@ -890,7 +890,8 @@ static int vdec_vp9_decode(void *h_vdec, struct mtk_vcodec_mem *bs,
memset(inst->seg_id_buf.va, 0, inst->seg_id_buf.size); memset(inst->seg_id_buf.va, 0, inst->seg_id_buf.size);
if (vsi->show_frame & BIT(2)) { if (vsi->show_frame & BIT(2)) {
if (vpu_dec_start(&inst->vpu, NULL, 0)) { ret = vpu_dec_start(&inst->vpu, NULL, 0);
if (ret) {
mtk_vcodec_err(inst, "vpu trig decoder failed"); mtk_vcodec_err(inst, "vpu trig decoder failed");
goto DECODE_ERROR; goto DECODE_ERROR;
} }
......
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