[PATCH 3/3] media: platform: mtk-mdp3: fix error return code in mdp_vpu_dev_init()
Sun Ke
sunke32 at huawei.com
Fri Sep 2 01:58:20 PDT 2022
If mdp_vpu_shared_mem_alloc failed, mdp_vpu_dev_init should return -ENOMEM.
Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver")
Signed-off-by: Sun Ke <sunke32 at huawei.com>
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c
index 9f5844385c8f..078040b7f65e 100644
--- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c
+++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c
@@ -175,6 +175,7 @@ int mdp_vpu_dev_init(struct mdp_vpu_dev *vpu, struct mtk_scp *scp,
mem_size = vpu_alloc_size;
if (mdp_vpu_shared_mem_alloc(vpu)) {
dev_err(&mdp->pdev->dev, "VPU memory alloc fail!");
+ err = -ENOMEM;
goto err_mem_alloc;
}
--
2.31.1
More information about the Linux-mediatek
mailing list