drm/core: make ida allocation and de-allocation consistent
Subsystems (2)
PATCH 1/1 drm/core: make ida allocation and de-allocation consistent
Connector type id is allocated using ida_simple_get, its counterpart is ida_simple_remove, so we should use it instead of ida_remove.
Signed-off-by Andrzej Hajda <[email protected]>
--- drivers/gpu/drm/drm_crtc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_crtc.c +3 -2
@@ -904,6 +904,8 @@ void drm_connector_cleanup(struct drm_connector *connector) {struct drm_device *dev = connector->dev;struct drm_display_mode *mode, *t; +struct ida *connector_ida = + &drm_connector_enum_list[connector->connector_type].ida;list_for_each_entry_safe (mode, t, &connector->probed_modes, head)drm_mode_remove (connector, mode);
@@ -911,8 +913,7 @@ 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 (connector_ida, connector->connector_type_id);drm_mode_object_put (dev, &connector->base);kfree (connector->name);
Signature · 1 line
1.9.1