Commit dec7920e authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

media: platform: mtk-mdp3: fix error code in mdp_vpu_dev_init()

Return a negative error code if mdp_vpu_shared_mem_alloc() fails.

Fixes: 61890cca ("media: platform: mtk-mdp3: add MediaTek MDP3 driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent bf4ed9e3
......@@ -173,7 +173,8 @@ int mdp_vpu_dev_init(struct mdp_vpu_dev *vpu, struct mtk_scp *scp,
/* vpu work_size was set in mdp_vpu_ipi_handle_init_ack */
mem_size = vpu_alloc_size;
if (mdp_vpu_shared_mem_alloc(vpu)) {
err = mdp_vpu_shared_mem_alloc(vpu);
if (err) {
dev_err(&mdp->pdev->dev, "VPU memory alloc fail!");
goto err_mem_alloc;
}
......
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