Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210182
b: refs/heads/master
c: 9927a40
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Chris Wilson committed Sep 6, 2010
1 parent 1571b43 commit 9e2e819
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: df51e7aa2cf204e3a65657a1d60b96cfda133e9b
refs/heads/master: 9927a403ca8c97798129953fa9cbb5dc259c7cb9
12 changes: 9 additions & 3 deletions trunk/drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,10 @@ static int i915_batchbuffer(struct drm_device *dev, void *data,
ret = copy_from_user(cliprects, batch->cliprects,
batch->num_cliprects *
sizeof(struct drm_clip_rect));
if (ret != 0)
if (ret != 0) {
ret = -EFAULT;
goto fail_free;
}
}

mutex_lock(&dev->struct_mutex);
Expand Down Expand Up @@ -662,8 +664,10 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data,
return -ENOMEM;

ret = copy_from_user(batch_data, cmdbuf->buf, cmdbuf->sz);
if (ret != 0)
if (ret != 0) {
ret = -EFAULT;
goto fail_batch_free;
}

if (cmdbuf->num_cliprects) {
cliprects = kcalloc(cmdbuf->num_cliprects,
Expand All @@ -676,8 +680,10 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data,
ret = copy_from_user(cliprects, cmdbuf->cliprects,
cmdbuf->num_cliprects *
sizeof(struct drm_clip_rect));
if (ret != 0)
if (ret != 0) {
ret = -EFAULT;
goto fail_clip_free;
}
}

mutex_lock(&dev->struct_mutex);
Expand Down

0 comments on commit 9e2e819

Please sign in to comment.