summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2016-10-07 09:27:41 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-10-10 11:20:48 +0200
commit9a47dba1f93148acb4e74f07716df7fad989c2e0 (patch)
treead0cef38177660cfbfadc4dbb07da951c3469a80
parent67c8f116f5d59df46c2be99674542b43195b21d7 (diff)
drm: Release resources with a safer function
We should use 'ida_simple_remove()' instead of 'ida_remove()' when freeing resources allocated with 'ida_simple_get()'. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1475825261-7735-1-git-send-email-christophe.jaillet@wanadoo.fr
-rw-r--r--drivers/gpu/drm/drm_connector.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 2e7430283043..2db7fb510b6c 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -341,11 +341,11 @@ void drm_connector_cleanup(struct drm_connector *connector)
list_for_each_entry_safe(mode, t, &connector->modes, head)
drm_mode_remove(connector, mode);
- ida_remove(&drm_connector_enum_list[connector->connector_type].ida,
- connector->connector_type_id);
+ ida_simple_remove(&drm_connector_enum_list[connector->connector_type].ida,
+ connector->connector_type_id);
- ida_remove(&dev->mode_config.connector_ida,
- connector->index);
+ ida_simple_remove(&dev->mode_config.connector_ida,
+ connector->index);
kfree(connector->display_info.bus_formats);
drm_mode_object_unregister(dev, &connector->base);