summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/i915
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-07-16 10:03:45 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-07-16 10:03:45 +0000
commitded84f5dcb8be0a1005d4046ada4ab9809a6211b (patch)
treeae2c4d056f2c66fcb7be88a9d2e88b5fe77e1a89 /sys/dev/pci/drm/i915
parentf4913dbdc80121428237b485a04ce915c0cc9298 (diff)
drm/i915: Skip stale object handle for debugfs per-file-stats
From Chris Wilson d073ed965cd908d320d49824dee02c80168f96a8 in linux 5.7.y/5.7.9 7dfbf8a07cf8c936b0d6cc810df6ae7923954d5b in mainline linux
Diffstat (limited to 'sys/dev/pci/drm/i915')
-rw-r--r--sys/dev/pci/drm/i915/i915_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915/i915_debugfs.c b/sys/dev/pci/drm/i915/i915_debugfs.c
index 6ca797128aa..4472b6eb308 100644
--- a/sys/dev/pci/drm/i915/i915_debugfs.c
+++ b/sys/dev/pci/drm/i915/i915_debugfs.c
@@ -229,7 +229,7 @@ static int per_file_stats(int id, void *ptr, void *data)
struct file_stats *stats = data;
struct i915_vma *vma;
- if (!kref_get_unless_zero(&obj->base.refcount))
+ if (IS_ERR_OR_NULL(obj) || !kref_get_unless_zero(&obj->base.refcount))
return 0;
stats->count++;