diff options
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index a06651309388..214b7992a3aa 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
@@ -351,9 +351,11 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo, | |||
351 | 351 | ||
352 | moved: | 352 | moved: |
353 | if (bo->evicted) { | 353 | if (bo->evicted) { |
354 | ret = bdev->driver->invalidate_caches(bdev, bo->mem.placement); | 354 | if (bdev->driver->invalidate_caches) { |
355 | if (ret) | 355 | ret = bdev->driver->invalidate_caches(bdev, bo->mem.placement); |
356 | pr_err("Can not flush read caches\n"); | 356 | if (ret) |
357 | pr_err("Can not flush read caches\n"); | ||
358 | } | ||
357 | bo->evicted = false; | 359 | bo->evicted = false; |
358 | } | 360 | } |
359 | 361 | ||