Commit 554f1d78 authored by Sascha Hauer's avatar Sascha Hauer Committed by Dave Airlie

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: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent aefd330e
...@@ -442,7 +442,7 @@ void drm_mode_remove(struct drm_connector *connector, ...@@ -442,7 +442,7 @@ void drm_mode_remove(struct drm_connector *connector,
struct drm_display_mode *mode) struct drm_display_mode *mode)
{ {
list_del(&mode->head); list_del(&mode->head);
kfree(mode); drm_mode_destroy(connector->dev, mode);
} }
EXPORT_SYMBOL(drm_mode_remove); EXPORT_SYMBOL(drm_mode_remove);
......
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