aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_stub.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index b37b0d99f262..e7c31e859b6b 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -346,6 +346,7 @@ static void drm_unplug_minor(struct drm_minor *minor)
346#endif 346#endif
347 347
348 drm_sysfs_device_remove(minor); 348 drm_sysfs_device_remove(minor);
349 idr_remove(&drm_minors_idr, minor->index);
349} 350}
350 351
351/** 352/**
@@ -365,9 +366,6 @@ static void drm_put_minor(struct drm_minor *minor)
365 DRM_DEBUG("release secondary minor %d\n", minor->index); 366 DRM_DEBUG("release secondary minor %d\n", minor->index);
366 367
367 drm_unplug_minor(minor); 368 drm_unplug_minor(minor);
368
369 idr_remove(&drm_minors_idr, minor->index);
370
371 kfree(minor); 369 kfree(minor);
372} 370}
373 371