drm: Use ENOENT consistently for the error return for an unmatched handle.
This is consistent with trying to access a filename that not exist within a directory which is a good analogy here. The main reason for the change is that it is easy to confuse the error code of EBADF as an performing an ioctl on an invalid file descriptor (rather than an unknown object). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
a44d2f3725
commit
bf79cb914d
9 changed files with 30 additions and 30 deletions
|
@ -275,7 +275,7 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
|
|||
|
||||
obj = drm_gem_object_lookup(dev, file_priv, args->handle);
|
||||
if (obj == NULL)
|
||||
return -EINVAL;
|
||||
return -ENOENT;
|
||||
obj_priv = to_intel_bo(obj);
|
||||
|
||||
if (!i915_tiling_ok(dev, args->stride, obj->size, args->tiling_mode)) {
|
||||
|
@ -362,7 +362,7 @@ i915_gem_get_tiling(struct drm_device *dev, void *data,
|
|||
|
||||
obj = drm_gem_object_lookup(dev, file_priv, args->handle);
|
||||
if (obj == NULL)
|
||||
return -EINVAL;
|
||||
return -ENOENT;
|
||||
obj_priv = to_intel_bo(obj);
|
||||
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue