]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/gpu/drm/ttm/ttm_object.c
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / drivers / gpu / drm / ttm / ttm_object.c
index 4f5fa8d65fe932a7e10803d10d0e0fc3090a7d59..fdb451e3ec01184a4642e6facd6ddf8e5f0cad47 100644 (file)
@@ -304,7 +304,7 @@ bool ttm_ref_object_exists(struct ttm_object_file *tfile,
         * Verify that the ref->obj pointer was actually valid!
         */
        rmb();
-       if (unlikely(atomic_read(&ref->kref.refcount) == 0))
+       if (unlikely(kref_read(&ref->kref) == 0))
                goto out_false;
 
        rcu_read_unlock();