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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -528,6 +528,7 @@ int imx_drm_add_crtc(struct drm_crtc *crtc,
	return 0;

err_register:
	list_del(&imx_drm_crtc->list);
	kfree(imx_drm_crtc);
err_alloc:
err_busy: