summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_damage_helper.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2019-01-04 14:09:12 +1000
committerDave Airlie <airlied@redhat.com>2019-01-04 14:09:15 +1000
commit9ddf32a8df9e342371aaf9233d59739a356231e6 (patch)
treebb1673a277628d7281c47dfbfc0418ebb232c905 /drivers/gpu/drm/drm_damage_helper.c
parent74136a3d47f51ae72ee8b9ebc1ec2a29bcf30676 (diff)
parentc75ff001f4fe21a8c9f15aad799a8949aea109f7 (diff)
Merge tag 'drm-misc-next-fixes-2019-01-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-nextdrm-next-2019-01-05
Fixes for v4.21: - Fix null pointer dereference on null state pointer. - Fix leaking damage clip when destroying plane state. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/46c4dbcd-dc23-7b46-fda9-16fe33e6ceef@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/drm_damage_helper.c')
-rw-r--r--drivers/gpu/drm/drm_damage_helper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_damage_helper.c b/drivers/gpu/drm/drm_damage_helper.c
index d2a1c7372f36..31032407254d 100644
--- a/drivers/gpu/drm/drm_damage_helper.c
+++ b/drivers/gpu/drm/drm_damage_helper.c
@@ -178,7 +178,7 @@ int drm_atomic_helper_dirtyfb(struct drm_framebuffer *fb,
state = drm_atomic_state_alloc(fb->dev);
if (!state) {
ret = -ENOMEM;
- goto out;
+ goto out_drop_locks;
}
state->acquire_ctx = &ctx;
@@ -238,6 +238,7 @@ out:
kfree(rects);
drm_atomic_state_put(state);
+out_drop_locks:
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);