diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-08-04 14:19:46 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-08-10 10:46:55 +1000 |
commit | bf79cb914dbfe848add8bb76cbb8ff89110d29ff (patch) | |
tree | 999c982fe33a39b5000fa16887bc439ff66d678f /drivers/gpu/drm/i915/i915_gem_tiling.c | |
parent | a44d2f37253cb7a8dc302e345d8909828b093e3c (diff) | |
download | talos-op-linux-bf79cb914dbfe848add8bb76cbb8ff89110d29ff.tar.gz talos-op-linux-bf79cb914dbfe848add8bb76cbb8ff89110d29ff.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_tiling.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_tiling.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c index 155719e4d16f..710eca70b323 100644 --- a/drivers/gpu/drm/i915/i915_gem_tiling.c +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c @@ -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); |