aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_drawable.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_drawable.c b/drivers/gpu/drm/drm_drawable.c
index 4a794d89942b..80be1cab62af 100644
--- a/drivers/gpu/drm/drm_drawable.c
+++ b/drivers/gpu/drm/drm_drawable.c
@@ -81,6 +81,10 @@ int drm_rmdraw(struct drm_device *dev, void *data, struct drm_file *file_priv)
81 spin_lock_irqsave(&dev->drw_lock, irqflags); 81 spin_lock_irqsave(&dev->drw_lock, irqflags);
82 82
83 info = drm_get_drawable_info(dev, draw->handle); 83 info = drm_get_drawable_info(dev, draw->handle);
84 if (info == NULL) {
85 spin_unlock_irqrestore(&dev->drw_lock, irqflags);
86 return -EINVAL;
87 }
84 drm_free(info->rects, info->num_rects * sizeof(struct drm_clip_rect), 88 drm_free(info->rects, info->num_rects * sizeof(struct drm_clip_rect),
85 DRM_MEM_BUFS); 89 DRM_MEM_BUFS);
86 drm_free(info, sizeof(struct drm_drawable_info), DRM_MEM_BUFS); 90 drm_free(info, sizeof(struct drm_drawable_info), DRM_MEM_BUFS);