diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
| -rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 11daa618385f..ec8a0d7ffa39 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
| @@ -3688,8 +3688,10 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, | |||
| 3688 | if (args->num_cliprects != 0) { | 3688 | if (args->num_cliprects != 0) { |
| 3689 | cliprects = kcalloc(args->num_cliprects, sizeof(*cliprects), | 3689 | cliprects = kcalloc(args->num_cliprects, sizeof(*cliprects), |
| 3690 | GFP_KERNEL); | 3690 | GFP_KERNEL); |
| 3691 | if (cliprects == NULL) | 3691 | if (cliprects == NULL) { |
| 3692 | ret = -ENOMEM; | ||
| 3692 | goto pre_mutex_err; | 3693 | goto pre_mutex_err; |
| 3694 | } | ||
| 3693 | 3695 | ||
| 3694 | ret = copy_from_user(cliprects, | 3696 | ret = copy_from_user(cliprects, |
| 3695 | (struct drm_clip_rect __user *) | 3697 | (struct drm_clip_rect __user *) |
