From: Sascha Hauer Date: Wed, 1 Feb 2012 10:38:19 +0000 (+0100) Subject: drm crtc: use drm_mode_destroy instead of kfree in drm_mode_remove X-Git-Tag: accepted/tizen/common/20141203.182822~5065^2~108 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=554f1d7888d4a1055965198d0ac46ba50e8b684e;p=platform%2Fkernel%2Flinux-arm64.git drm crtc: use drm_mode_destroy instead of kfree in drm_mode_remove Modes are created using drm_mode_create which does a drm_mode_object_get, so use drm_mode_destroy in drm_mode_remove which does a drm_mode_object_put. Signed-off-by: Sascha Hauer Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index c1a0d34..33ebe29 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -442,7 +442,7 @@ void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode) { list_del(&mode->head); - kfree(mode); + drm_mode_destroy(connector->dev, mode); } EXPORT_SYMBOL(drm_mode_remove);