Skip to content

Commit

Permalink
drm/stm: Fix an error handling path in stm_drm_platform_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit ce7c90bfda2656418c69ba0dd8f8a7536b8928d4 ]

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

Fixes: b759012 ("drm/stm: Add STM32 LTDC driver")
Signed-off-by: Christophe JAILLET <[email protected]>
Acked-by: Raphael Gallais-Pou <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20fff7f853f20a48a96db8ff186124470ec4d976.1704560028.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Raphael Gallais-Pou <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
(cherry picked from commit ba2310096e6574000109bd0f1adc3e8885c18301)
Signed-off-by: Sherry Yang <[email protected]>
  • Loading branch information
tititiou36 authored and SherryYang1 committed Nov 12, 2024
1 parent b06b2ba commit f2c82d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/stm/drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,14 @@ static int stm_drm_platform_probe(struct platform_device *pdev)

ret = drm_dev_register(ddev, 0);
if (ret)
goto err_put;
goto err_unload;

drm_fbdev_generic_setup(ddev, 16);

return 0;

err_unload:
drv_unload(ddev);
err_put:
drm_dev_put(ddev);

Expand Down

0 comments on commit f2c82d5

Please sign in to comment.