aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_drawable.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_drawable.c')
-rw-r--r--drivers/gpu/drm/drm_drawable.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_drawable.c b/drivers/gpu/drm/drm_drawable.c
index 70b15d1b8f54..4a794d89942b 100644
--- a/drivers/gpu/drm/drm_drawable.c
+++ b/drivers/gpu/drm/drm_drawable.c
@@ -76,11 +76,14 @@ int drm_rmdraw(struct drm_device *dev, void *data, struct drm_file *file_priv)
76{ 76{
77 struct drm_draw *draw = data; 77 struct drm_draw *draw = data;
78 unsigned long irqflags; 78 unsigned long irqflags;
79 struct drm_drawable_info *info;
79 80
80 spin_lock_irqsave(&dev->drw_lock, irqflags); 81 spin_lock_irqsave(&dev->drw_lock, irqflags);
81 82
82 drm_free(drm_get_drawable_info(dev, draw->handle), 83 info = drm_get_drawable_info(dev, draw->handle);
83 sizeof(struct drm_drawable_info), DRM_MEM_BUFS); 84 drm_free(info->rects, info->num_rects * sizeof(struct drm_clip_rect),
85 DRM_MEM_BUFS);
86 drm_free(info, sizeof(struct drm_drawable_info), DRM_MEM_BUFS);
84 87
85 idr_remove(&dev->drw_idr, draw->handle); 88 idr_remove(&dev->drw_idr, draw->handle);
86 89