aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_lease.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-23 08:01:20 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-23 08:01:20 +0100
commit6203da9803017701da5782998157d9826215059d (patch)
tree1d754f139ac25c643e88f429966606d3b44e431f /drivers/gpu/drm/drm_lease.c
parentstaging: vt6656: Use BIT() macro in vnt_mac_reg_bits_* functions (diff)
parentLinux 5.6-rc7 (diff)
downloadlinux-dev-6203da9803017701da5782998157d9826215059d.tar.xz
linux-dev-6203da9803017701da5782998157d9826215059d.zip
Merge 5.6-rc7 into staging-next
We need the staging/iio fixes in here as well Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/drm_lease.c')
-rw-r--r--drivers/gpu/drm/drm_lease.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_lease.c b/drivers/gpu/drm/drm_lease.c
index b481cafdde28..825abe38201a 100644
--- a/drivers/gpu/drm/drm_lease.c
+++ b/drivers/gpu/drm/drm_lease.c
@@ -542,10 +542,12 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev,
}
DRM_DEBUG_LEASE("Creating lease\n");
+ /* lessee will take the ownership of leases */
lessee = drm_lease_create(lessor, &leases);
if (IS_ERR(lessee)) {
ret = PTR_ERR(lessee);
+ idr_destroy(&leases);
goto out_leases;
}
@@ -580,7 +582,6 @@ out_lessee:
out_leases:
put_unused_fd(fd);
- idr_destroy(&leases);
DRM_DEBUG_LEASE("drm_mode_create_lease_ioctl failed: %d\n", ret);
return ret;