Skip to content

Commit 77a8e6f

Browse files
SinkFindergregkh
authored andcommitted
drm/imx: fix memory leak when fails to init
commit 69c3ed7 upstream. Put DRM device on initialization failure path rather than directly return error code. Fixes: a67d508 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 74612ec commit 77a8e6f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/imx/imx-drm-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static int imx_drm_bind(struct device *dev)
215215

216216
ret = drmm_mode_config_init(drm);
217217
if (ret)
218-
return ret;
218+
goto err_kms;
219219

220220
ret = drm_vblank_init(drm, MAX_CRTC);
221221
if (ret)

0 commit comments

Comments
 (0)