提交 9a47dba1 编写于 作者: C Christophe JAILLET 提交者: Daniel Vetter

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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1475825261-7735-1-git-send-email-christophe.jaillet@wanadoo.fr
上级 67c8f116
...@@ -341,11 +341,11 @@ void drm_connector_cleanup(struct drm_connector *connector) ...@@ -341,11 +341,11 @@ void drm_connector_cleanup(struct drm_connector *connector)
list_for_each_entry_safe(mode, t, &connector->modes, head) list_for_each_entry_safe(mode, t, &connector->modes, head)
drm_mode_remove(connector, mode); drm_mode_remove(connector, mode);
ida_remove(&drm_connector_enum_list[connector->connector_type].ida, ida_simple_remove(&drm_connector_enum_list[connector->connector_type].ida,
connector->connector_type_id); connector->connector_type_id);
ida_remove(&dev->mode_config.connector_ida, ida_simple_remove(&dev->mode_config.connector_ida,
connector->index); connector->index);
kfree(connector->display_info.bus_formats); kfree(connector->display_info.bus_formats);
drm_mode_object_unregister(dev, &connector->base); drm_mode_object_unregister(dev, &connector->base);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册