[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1607070575-32609-1-git-send-email-zhangchangzhong@huawei.com>
Date: Fri, 4 Dec 2020 16:29:34 +0800
From: Zhang Changzhong <zhangchangzhong@...wei.com>
To: Tiffany Lin <tiffany.lin@...iatek.com>,
Andrew-CT Chen <andrew-ct.chen@...iatek.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Rui Wang <gtk_ruiwang@...iatek.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>
CC: Zhang Changzhong <zhangchangzhong@...wei.com>,
<linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] 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: dea42fb79f4f ("media: mtk-vcodec: reset segment data then trig decoder")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@...wei.com>
---
drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
index 5ea153a..d988021 100644
--- a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
+++ b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
@@ -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);
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");
goto DECODE_ERROR;
}
--
2.9.5
Powered by blists - more mailing lists