summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_gem.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-08-11 11:58:31 +1000
committerDave Airlie <airlied@redhat.com>2020-08-11 11:58:31 +1000
commitc44264f9f729fd63bd6a81a6ac5cd6cd49af09e5 (patch)
treead77b18ffeafb50b3eb9ba6472670dc1d96f5558 /drivers/gpu/drm/drm_gem.c
parentca457ab5908603b36be903e73977afde1ba03c84 (diff)
parentbcf876870b95592b52519ed4aafcf9d95999bc9c (diff)
downloadlinux-c44264f9f729fd63bd6a81a6ac5cd6cd49af09e5.tar.gz
linux-c44264f9f729fd63bd6a81a6ac5cd6cd49af09e5.tar.bz2
linux-c44264f9f729fd63bd6a81a6ac5cd6cd49af09e5.zip
Merge tag 'v5.8' into drm-next
I need to backmerge 5.8 as I've got a bunch of fixes sitting on an rc7 base that I want to land. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_gem.c')
-rw-r--r--drivers/gpu/drm/drm_gem.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index a57f5379fc08..d4e7c8370565 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -879,9 +879,6 @@ err:
* @file_priv: drm file-private structure
*
* Open an object using the global name, returning a handle and the size.
- *
- * This handle (of course) holds a reference to the object, so the object
- * will not go away until the handle is deleted.
*/
int
drm_gem_open_ioctl(struct drm_device *dev, void *data,
@@ -906,14 +903,15 @@ drm_gem_open_ioctl(struct drm_device *dev, void *data,
/* drm_gem_handle_create_tail unlocks dev->object_name_lock. */
ret = drm_gem_handle_create_tail(file_priv, obj, &handle);
- drm_gem_object_put(obj);
if (ret)
- return ret;
+ goto err;
args->handle = handle;
args->size = obj->size;
- return 0;
+err:
+ drm_gem_object_put(obj);
+ return ret;
}
/**