aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_context.c')
-rw-r--r--drivers/gpu/drm/drm_context.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_context.c b/drivers/gpu/drm/drm_context.c
index 6d440fb894cf..325365f6d355 100644
--- a/drivers/gpu/drm/drm_context.c
+++ b/drivers/gpu/drm/drm_context.c
@@ -154,8 +154,6 @@ int drm_getsareactx(struct drm_device *dev, void *data,
154 return -EINVAL; 154 return -EINVAL;
155 } 155 }
156 156
157 mutex_unlock(&dev->struct_mutex);
158
159 request->handle = NULL; 157 request->handle = NULL;
160 list_for_each_entry(_entry, &dev->maplist, head) { 158 list_for_each_entry(_entry, &dev->maplist, head) {
161 if (_entry->map == map) { 159 if (_entry->map == map) {
@@ -164,6 +162,9 @@ int drm_getsareactx(struct drm_device *dev, void *data,
164 break; 162 break;
165 } 163 }
166 } 164 }
165
166 mutex_unlock(&dev->struct_mutex);
167
167 if (request->handle == NULL) 168 if (request->handle == NULL)
168 return -EINVAL; 169 return -EINVAL;
169 170