From: Chris Wilson Date: Sun, 29 Jan 2012 16:45:32 +0000 (+0000) Subject: drm: Pass the real error code back during GEM bo initialisation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dd8bc93d45c0ac4f64bf074d4be72418aac1609b;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 396e60ce811..f8625e29072 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);