From: Russell King Date: Mon, 16 Dec 2013 11:33:24 +0000 (+0000) Subject: imx-drm: imx-drm-core: fix error cleanup path for imx_drm_add_crtc() X-Git-Tag: accepted/tizen/common/20141203.182822~904^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82832046e285952f14e707647f9ef82466c883cc;p=platform%2Fkernel%2Flinux-arm64.git 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: Russell King Acked-by: Sascha Hauer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 6bd015a..b5ff45f3 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c @@ -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: