[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 03:15:33 PDT 2022



在 2022/9/2 17:10, AngeloGioacchino Del Regno 写道:
> Il 02/09/22 10:58, Sun Ke ha scritto:
>> 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>
> 
> Hello Sun,
> thanks for the patch! However, someone else already sent the same fix 
> and it's
> in a better shape. Please look at [1].
> 
> Thanks,
> Angelo
> 
> [1]: 
> https://patchwork.kernel.org/project/linux-mediatek/patch/YxDGFMwyeNXFPaig@kili/ 

Oh. I am late.

Thanks,
Sun Ke

> 
> 
>> ---
>>   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;
>>       }
>>
> 
> 
> .



More information about the linux-arm-kernel mailing list