Commit 69c3ed72 authored by Pan Bian's avatar Pan Bian Committed by Philipp Zabel

drm/imx: fix memory leak when fails to init

Put DRM device on initialization failure path rather than directly
return error code.

Fixes: a67d5088 ("drm/imx: drop explicit drm_mode_config_cleanup")
Signed-off-by: default avatarPan Bian <bianpan2016@163.com>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent a38fd874
......@@ -215,7 +215,7 @@ static int imx_drm_bind(struct device *dev)
ret = drmm_mode_config_init(drm);
if (ret)
return ret;
goto err_kms;
ret = drm_vblank_init(drm, MAX_CRTC);
if (ret)
......
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