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

Matthias Brugger matthias.bgg at gmail.com
Mon Sep 5 04:43:55 PDT 2022



On 01/09/2022 16:47, Dan Carpenter wrote:
> Return a negative error code if mdp_vpu_shared_mem_alloc() fails.
> 
> Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver")
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>

Reviewed-by: Matthias Brugger <matthias.bgg at gmail.com>

> ---
>   drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c
> index 9f5844385c8f..a72bed927bb6 100644
> --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c
> +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c
> @@ -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;
>   	}



More information about the Linux-mediatek mailing list