Commit 82832046 authored by Russell King's avatar Russell King Committed by Greg Kroah-Hartman

imx-drm: imx-drm-core: fix error cleanup path for imx_drm_add_crtc()

imx_drm_add_crtc() was kfree'ing the imx_drm_crtc structure while
leaving it on the list of CRTCs.  Delete it from the list first.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c6236c0c
...@@ -528,6 +528,7 @@ int imx_drm_add_crtc(struct drm_crtc *crtc, ...@@ -528,6 +528,7 @@ int imx_drm_add_crtc(struct drm_crtc *crtc,
return 0; return 0;
err_register: err_register:
list_del(&imx_drm_crtc->list);
kfree(imx_drm_crtc); kfree(imx_drm_crtc);
err_alloc: err_alloc:
err_busy: err_busy:
......
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