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 <[email protected]>
CC: Joonas Lahtinen <[email protected]>
CC: Rodrigo Vivi <[email protected]>
CC: David Airlie <[email protected]>
CC: Daniel Vetter <[email protected]>

Signed-off-by: Nirmoy Das <[email protected]>
---
 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

Reply via email to