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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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/

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





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux