Skip to content

Commit

Permalink
drm/i915: return -ENOENT if the context doesn't exist
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Vetter committed Jun 20, 2012
1 parent df12c6d commit 0d32601
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/i915_gem_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0d32601

Please sign in to comment.