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.nik...@linux.intel.com> CC: Joonas Lahtinen <joonas.lahti...@linux.intel.com> CC: Rodrigo Vivi <rodrigo.v...@intel.com> CC: David Airlie <airl...@linux.ie> CC: Daniel Vetter <dan...@ffwll.ch> Signed-off-by: Nirmoy Das <nirmoy....@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