drm/mediatek: Add exception handing in mtk_drm_probe() if component init fail
authorYu Kuai <yukuai3@huawei.com>
Wed, 9 Sep 2020 08:49:42 +0000 (16:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 10:59:57 +0000 (12:59 +0200)
commita51fc6150df5b857abf31887f355c268565f95f6
treee2ab6ebcb895df7e2243300aae93462fcf074fe0
parent9a904d3afc880e682bde7362fe7872917a45cd62
drm/mediatek: Add exception handing in mtk_drm_probe() if component init fail

[ Upstream commit 64c194c00789889b0f9454f583712f079ba414ee ]

mtk_ddp_comp_init() is called in a loop in mtk_drm_probe(), if it
fail, previous successive init component is not proccessed.

Thus uninitialize valid component and put their device if component
init failed.

Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/mediatek/mtk_drm_drv.c