summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2024-03-18 09:34:33 +0000
committerMatthew Auld <matthew.auld@intel.com>2024-03-19 08:31:43 +0000
commitab0c5aba32fc6dd17ea699d23ad871223d523a17 (patch)
tree973f236f6475746bbdbf776064d137fd891cc679
parent10ed10c27967cacf90d3daa6f66ddddaa35bb796 (diff)
downloadlinux-stable-ab0c5aba32fc6dd17ea699d23ad871223d523a17.tar.gz
linux-stable-ab0c5aba32fc6dd17ea699d23ad871223d523a17.tar.bz2
linux-stable-ab0c5aba32fc6dd17ea699d23ad871223d523a17.zip
drm/xe/client: drop bogus bo NULL check
If we fished it out the list then it can't be null; the list entry is embedded in the bo. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240318093431.21075-4-matthew.auld@intel.com
-rw-r--r--drivers/gpu/drm/xe/xe_drm_client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index 142a1905b624..da154b059583 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -155,7 +155,7 @@ static void show_meminfo(struct drm_printer *p, struct drm_file *file)
/* Internal objects. */
spin_lock(&client->bos_lock);
list_for_each_entry(bo, &client->bos_list, client_link) {
- if (!bo || !kref_get_unless_zero(&bo->ttm.base.refcount))
+ if (!kref_get_unless_zero(&bo->ttm.base.refcount))
continue;
bo_meminfo(bo, stats);
xe_bo_put(bo);