drm/ttm: fix misplaced parentheses
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 15 Jul 2009 06:00:37 +0000 (16:00 +1000)
committerDave Airlie <airlied@linux.ie>
Wed, 15 Jul 2009 06:00:37 +0000 (16:00 +1000)
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>
drivers/gpu/drm/ttm/ttm_bo_vm.c

index 40b75032ea47459a43b5de71d8801c84e201180b..fe949a12fe40b4804ebcdd047d7286629d0de51d 100644 (file)
@@ -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;
        }
@@ -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;