diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-06-19 16:52:31 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-06-20 11:16:08 +0200 |
commit | 0d326013763bd4610cb72d9e2fa7f8ff2f414995 (patch) | |
tree | b98bcce93bf508a50424da1c74249c1845017539 /drivers/gpu/drm | |
parent | drm/i915: initialize the context idr unconditionally (diff) | |
download | linux-0d326013763bd4610cb72d9e2fa7f8ff2f414995.tar.xz linux-0d326013763bd4610cb72d9e2fa7f8ff2f414995.zip |
drm/i915: return -ENOENT if the context doesn't exist
This is our customary "no such object" errno, not -EINVAL.
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_context.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 047f81c206b3..f775d861f052 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -460,7 +460,7 @@ int i915_switch_context(struct intel_ring_buffer *ring, } else { to = i915_gem_context_get(file_priv, to_id); if (to == NULL) - return -EINVAL; + return -ENOENT; } if (from_obj == to->obj) @@ -526,7 +526,7 @@ int i915_gem_context_destroy_ioctl(struct drm_device *dev, void *data, ctx = i915_gem_context_get(file_priv, args->ctx_id); if (!ctx) { mutex_unlock(&dev->struct_mutex); - return -EINVAL; + return -ENOENT; } do_destroy(ctx); |