Commit ce7c90bf authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Raphael Gallais-Pou

drm/stm: Fix an error handling path in stm_drm_platform_probe()

If drm_dev_register() fails, a call to drv_load() must be undone, as
already done in the remove function.

Fixes: b759012c ("drm/stm: Add STM32 LTDC driver")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarRaphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20fff7f853f20a48a96db8ff186124470ec4d976.1704560028.git.christophe.jaillet@wanadoo.frSigned-off-by: default avatarRaphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
parent f592e016
...@@ -203,12 +203,14 @@ static int stm_drm_platform_probe(struct platform_device *pdev) ...@@ -203,12 +203,14 @@ static int stm_drm_platform_probe(struct platform_device *pdev)
ret = drm_dev_register(ddev, 0); ret = drm_dev_register(ddev, 0);
if (ret) if (ret)
goto err_put; goto err_unload;
drm_fbdev_dma_setup(ddev, 16); drm_fbdev_dma_setup(ddev, 16);
return 0; return 0;
err_unload:
drv_unload(ddev);
err_put: err_put:
drm_dev_put(ddev); drm_dev_put(ddev);
......
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