summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_stub.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 76b4d718af601..b37b0d99f262a 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -341,6 +341,10 @@ static void drm_unplug_minor(struct drm_minor *minor)
if (!minor || !device_is_registered(minor->kdev))
return;
+#if defined(CONFIG_DEBUG_FS)
+ drm_debugfs_cleanup(minor);
+#endif
+
drm_sysfs_device_remove(minor);
}
@@ -360,10 +364,6 @@ static void drm_put_minor(struct drm_minor *minor)
DRM_DEBUG("release secondary minor %d\n", minor->index);
-#if defined(CONFIG_DEBUG_FS)
- drm_debugfs_cleanup(minor);
-#endif
-
drm_unplug_minor(minor);
idr_remove(&drm_minors_idr, minor->index);