diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_drawable.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_drawable.c b/drivers/gpu/drm/drm_drawable.c index 1839c57663c5..70b15d1b8f54 100644 --- a/drivers/gpu/drm/drm_drawable.c +++ b/drivers/gpu/drm/drm_drawable.c | |||
@@ -111,7 +111,9 @@ int drm_update_drawable_info(struct drm_device *dev, void *data, struct drm_file | |||
111 | 111 | ||
112 | switch (update->type) { | 112 | switch (update->type) { |
113 | case DRM_DRAWABLE_CLIPRECTS: | 113 | case DRM_DRAWABLE_CLIPRECTS: |
114 | if (update->num != info->num_rects) { | 114 | if (update->num == 0) |
115 | rects = NULL; | ||
116 | else if (update->num != info->num_rects) { | ||
115 | rects = drm_alloc(update->num * sizeof(struct drm_clip_rect), | 117 | rects = drm_alloc(update->num * sizeof(struct drm_clip_rect), |
116 | DRM_MEM_BUFS); | 118 | DRM_MEM_BUFS); |
117 | } else | 119 | } else |