Skip to content

Commit

Permalink
drm crtc: use drm_mode_destroy instead of kfree in drm_mode_remove
Browse files Browse the repository at this point in the history
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 <s.hauer@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Sascha Hauer authored and Dave Airlie committed Feb 3, 2012
1 parent aefd330 commit 554f1d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 554f1d7

Please sign in to comment.