aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-29 16:45:32 +0000
committerDave Airlie <airlied@redhat.com>2012-01-30 09:31:42 +0000
commitdd8bc93d45c0ac4f64bf074d4be72418aac1609b (patch)
tree79bc34bf0a99619b99a505642d39b38f354742e0
parent6e877b576ddf7cde5db2e9a6dcb56fef0ea77e64 (diff)
downloadlinux-linaro-stable-dd8bc93d45c0ac4f64bf074d4be72418aac1609b.tar.gz
drm: Pass the real error code back during GEM bo initialisation
In particular, I found I was hitting the max-file limit in the VFS, and the EFILE was being magically transformed into ENOMEM. Confusion reigns. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/drm_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 396e60ce8114..f8625e290728 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -140,7 +140,7 @@ int drm_gem_object_init(struct drm_device *dev,
obj->dev = dev;
obj->filp = shmem_file_setup("drm mm object", size, VM_NORESERVE);
if (IS_ERR(obj->filp))
- return -ENOMEM;
+ return PTR_ERR(obj->filp);
kref_init(&obj->refcount);
atomic_set(&obj->handle_count, 0);