mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 15:13:55 +08:00
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>
This commit is contained in:
parent
df12c6d5ec
commit
0d32601376
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user