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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_context.c b/drivers/gpu/drm/drm_context.c
index 325365f6d355..affa629589ac 100644
--- a/drivers/gpu/drm/drm_context.c
+++ b/drivers/gpu/drm/drm_context.c
@@ -85,11 +85,12 @@ again:
85 mutex_lock(&dev->struct_mutex); 85 mutex_lock(&dev->struct_mutex);
86 ret = idr_get_new_above(&dev->ctx_idr, NULL, 86 ret = idr_get_new_above(&dev->ctx_idr, NULL,
87 DRM_RESERVED_CONTEXTS, &new_id); 87 DRM_RESERVED_CONTEXTS, &new_id);
88 if (ret == -EAGAIN) {
89 mutex_unlock(&dev->struct_mutex);
90 goto again;
91 }
92 mutex_unlock(&dev->struct_mutex); 88 mutex_unlock(&dev->struct_mutex);
89 if (ret == -EAGAIN)
90 goto again;
91 else if (ret)
92 return ret;
93
93 return new_id; 94 return new_id;
94} 95}
95 96