Skip to content

Commit

Permalink
media: mtk-mdp: handle vpu_wdt_reg_handler() errors during probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eizan Miyamoto authored and Mauro Carvalho Chehab committed Jul 4, 2020
1 parent 256a12e commit ee18fc7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/media/platform/mtk-mdp/mtk_mdp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,12 @@ static int mtk_mdp_probe(struct platform_device *pdev)
}

mdp->vpu_dev = vpu_get_plat_device(pdev);
vpu_wdt_reg_handler(mdp->vpu_dev, mtk_mdp_reset_handler, mdp,
VPU_RST_MDP);
ret = vpu_wdt_reg_handler(mdp->vpu_dev, mtk_mdp_reset_handler, mdp,
VPU_RST_MDP);
if (ret) {
dev_err(&pdev->dev, "Failed to register reset handler\n");
goto err_m2m_register;
}

platform_set_drvdata(pdev, mdp);

Expand Down

0 comments on commit ee18fc7

Please sign in to comment.