[PATCH 3/4] drm/i915/gt: do not check for NULL debugfs dentry

Nirmoy Das nirmoy.das at amd.com
Mon Oct 11 19:06:06 UTC 2021


Do not check for NULL value as drm.primary->debugfs_root
will either contain a valid pointer or an encoded error
instead of NULL.

CC: Jani Nikula <jani.nikula at linux.intel.com>
CC: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
CC: Rodrigo Vivi <rodrigo.vivi at intel.com>
CC: David Airlie <airlied at linux.ie>
CC: Daniel Vetter <daniel at ffwll.ch>

Signed-off-by: Nirmoy Das <nirmoy.das at amd.com>
---
 drivers/gpu/drm/i915/gt/debugfs_gt.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/debugfs_gt.c b/drivers/gpu/drm/i915/gt/debugfs_gt.c
index 591eb60785db..95ca1b3ad320 100644
--- a/drivers/gpu/drm/i915/gt/debugfs_gt.c
+++ b/drivers/gpu/drm/i915/gt/debugfs_gt.c
@@ -16,9 +16,6 @@ void debugfs_gt_register(struct intel_gt *gt)
 {
 	struct dentry *root;

-	if (!gt->i915->drm.primary->debugfs_root)
-		return;
-
 	root = debugfs_create_dir("gt", gt->i915->drm.primary->debugfs_root);
 	if (IS_ERR(root))
 		return;
--
2.32.0



More information about the dri-devel mailing list