Commit 0d326013 authored by Daniel Vetter's avatar Daniel Vetter
Browse files

drm/i915: return -ENOENT if the context doesn't exist

This is our customary "no such object" errno, not -EINVAL.
Reviewed-by: default avatarBen Widawsky <>
Signed-Off-by: default avatarDaniel Vetter <>
parent df12c6d5
......@@ -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) {
return -EINVAL;
return -ENOENT;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment