Commit ff34e17c authored by Wei Yongjun's avatar Wei Yongjun Committed by Matthias Brugger

soc: mediatek: Missing platform_device_unregister() on error in mtk_mmsys_probe()

Add the missing platform_device_unregister() before return
from mtk_mmsys_probe() in the error handling case.

Fixes: 667c7692 ("soc / drm: mediatek: Fix mediatek-drm device probing")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20200506141317.119537-1-weiyongjun1@huawei.comSigned-off-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
parent 1a6e55ca
......@@ -311,8 +311,10 @@ static int mtk_mmsys_probe(struct platform_device *pdev)
drm = platform_device_register_data(&pdev->dev, "mediatek-drm",
PLATFORM_DEVID_AUTO, NULL, 0);
if (IS_ERR(drm))
if (IS_ERR(drm)) {
platform_device_unregister(clks);
return PTR_ERR(drm);
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment