mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 06:34:12 +08:00
drm/imx: fix memory leak when fails to init
Put DRM device on initialization failure path rather than directly
return error code.
Fixes: a67d5088ce
("drm/imx: drop explicit drm_mode_config_cleanup")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
parent
a38fd87484
commit
69c3ed7282
@ -215,7 +215,7 @@ static int imx_drm_bind(struct device *dev)
|
|||||||
|
|
||||||
ret = drmm_mode_config_init(drm);
|
ret = drmm_mode_config_init(drm);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto err_kms;
|
||||||
|
|
||||||
ret = drm_vblank_init(drm, MAX_CRTC);
|
ret = drm_vblank_init(drm, MAX_CRTC);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
Loading…
Reference in New Issue
Block a user