diff options
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_object.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_object.c b/drivers/gpu/drm/ttm/ttm_object.c index 4f5fa8d65fe9..fdb451e3ec01 100644 --- a/drivers/gpu/drm/ttm/ttm_object.c +++ b/drivers/gpu/drm/ttm/ttm_object.c | |||
@@ -304,7 +304,7 @@ bool ttm_ref_object_exists(struct ttm_object_file *tfile, | |||
304 | * Verify that the ref->obj pointer was actually valid! | 304 | * Verify that the ref->obj pointer was actually valid! |
305 | */ | 305 | */ |
306 | rmb(); | 306 | rmb(); |
307 | if (unlikely(atomic_read(&ref->kref.refcount) == 0)) | 307 | if (unlikely(kref_read(&ref->kref) == 0)) |
308 | goto out_false; | 308 | goto out_false; |
309 | 309 | ||
310 | rcu_read_unlock(); | 310 | rcu_read_unlock(); |