Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd8bc93d authored by Chris Wilson's avatar Chris Wilson Committed by Dave Airlie
Browse files

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 6e877b57
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);