diff options
author | Eizan Miyamoto <eizan@chromium.org> | 2020-05-07 12:23:44 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-07-04 11:58:19 +0200 |
commit | 256a12e1a343e1efff00a9065063f0846d219336 (patch) | |
tree | e523be63923e14bfeacf438ec54e6d7ea93745da /drivers/media/platform/mtk-mdp | |
parent | 86ef5146fe49bcf0801fba199d98a37151ed3791 (diff) | |
download | linux-next-256a12e1a343e1efff00a9065063f0846d219336.tar.gz |
media: mtk-mdp: handle vb2_dma_contig_set_max_seg_size errors during probe
This is a cleanup to better handle errors during MDP probe.
Signed-off-by: Eizan Miyamoto <eizan@chromium.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/mtk-mdp')
-rw-r--r-- | drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c index aeaed2cf4458..9b24b8d46eb7 100644 --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.c +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.c @@ -193,7 +193,11 @@ static int mtk_mdp_probe(struct platform_device *pdev) platform_set_drvdata(pdev, mdp); - vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32)); + ret = vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32)); + if (ret) { + dev_err(&pdev->dev, "Failed to set vb2 dma mag seg size\n"); + goto err_m2m_register; + } pm_runtime_enable(dev); dev_dbg(dev, "mdp-%d registered successfully\n", mdp->id); |