Skip to content

Commit

Permalink
drm/imx: fix memory leak when fails to init
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Philipp Zabel <[email protected]>
  • Loading branch information
SinkFinder authored and pH5 committed Mar 25, 2021
1 parent a38fd87 commit 69c3ed7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/imx/imx-drm-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 69c3ed7

Please sign in to comment.