diff options
author | Dave Airlie <airlied@redhat.com> | 2021-05-20 13:30:27 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2021-05-20 13:31:12 +1000 |
commit | ae25ec2fc6c5a9e5767bf1922cd648501d0f914c (patch) | |
tree | cb07d9b3b578723cdc657c85760758db7bd28c15 /drivers/gpu/drm/drm_aperture.c | |
parent | 41ab70e06e13f81f0da76c5e0734c9bd32b5a4d9 (diff) | |
parent | 30039405ac25665119ff7bc944d33b136ef1c8a9 (diff) |
Merge tag 'drm-misc-next-2021-05-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 5.14:
UAPI Changes:
Cross-subsystem Changes:
Core Changes:
* aperture: Fix unlocking on errors
* legacy: Fix some doc comments
Driver Changes:
* drm/amdgpu: Free resource on fence usage query; Fix fence calculation;
* drm/bridge: Lt9611: Add missing MODULE_DEVICE_TABLE
* drm/i915: Print formats with %p4cc
* drm/ingenic: IPU planes are now always of type OVERLAY
* drm/nouveau: Remove left-over reference to struct drm_device.pdev
* drm/panfrost: Disable devfreq if num_supplies > 1; Add Mediatek MT8183 +
DT bindings; Cleanups
* drm/simpledrm: Print resources with %pr; Fix use-after-free errors;
Fix NULL deref; Fix MAINTAINERS entry
* drm/vmwgfx: Fix memory allocation and leak in FIFO allocation; Fix
return value in PCI resource setup
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/YKJs2IfwSYvuGPU7@linux-uq9g.fritz.box
Diffstat (limited to 'drivers/gpu/drm/drm_aperture.c')
-rw-r--r-- | drivers/gpu/drm/drm_aperture.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_aperture.c b/drivers/gpu/drm/drm_aperture.c index 33bf018c3bdf..9335d9d6cf9a 100644 --- a/drivers/gpu/drm/drm_aperture.c +++ b/drivers/gpu/drm/drm_aperture.c @@ -164,13 +164,17 @@ static int devm_aperture_acquire(struct drm_device *dev, list_for_each(pos, &drm_apertures) { ap = container_of(pos, struct drm_aperture, lh); - if (overlap(base, end, ap->base, ap->base + ap->size)) + if (overlap(base, end, ap->base, ap->base + ap->size)) { + mutex_unlock(&drm_apertures_lock); return -EBUSY; + } } ap = devm_kzalloc(dev->dev, sizeof(*ap), GFP_KERNEL); - if (!ap) + if (!ap) { + mutex_unlock(&drm_apertures_lock); return -ENOMEM; + } ap->dev = dev; ap->base = base; |