Skip to content

Commit

Permalink
drm/ttm: fix misplaced parentheses
Browse files Browse the repository at this point in the history
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
  • Loading branch information
Roel Kluin authored and Dave Airlie committed Jul 15, 2009
1 parent 42dd861 commit 916635b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/ttm/ttm_bo_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ ssize_t ttm_bo_io(struct ttm_bo_device *bdev, struct file *filp,
goto out_unref;

kmap_offset = dev_offset - bo->vm_node->start;
if (unlikely(kmap_offset) >= bo->num_pages) {
if (unlikely(kmap_offset >= bo->num_pages)) {
ret = -EFBIG;
goto out_unref;
}
Expand Down Expand Up @@ -401,7 +401,7 @@ ssize_t ttm_bo_fbdev_io(struct ttm_buffer_object *bo, const char __user *wbuf,
bool dummy;

kmap_offset = (*f_pos >> PAGE_SHIFT);
if (unlikely(kmap_offset) >= bo->num_pages)
if (unlikely(kmap_offset >= bo->num_pages))
return -EFBIG;

page_offset = *f_pos & ~PAGE_MASK;
Expand Down

0 comments on commit 916635b

Please sign in to comment.