From: Nirmoy Das Date: Wed, 6 Oct 2021 09:06:33 +0000 (+0200) Subject: drm/amdgpu: return early if debugfs is not initialized X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5b9581df9f17b3e356d67735a07da97ba8e1fdd0;p=linux.git drm/amdgpu: return early if debugfs is not initialized Check first if debugfs is initialized before creating amdgpu debugfs files. References: https://gitlab.freedesktop.org/drm/amd/-/issues/1686 Signed-off-by: Nirmoy Das Reviewed-by: Christian König Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index 6611b3c7c149..5497e2d31d1a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -1617,6 +1617,9 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev) struct dentry *ent; int r, i; + if (!debugfs_initialized()) + return 0; + ent = debugfs_create_file("amdgpu_preempt_ib", 0600, root, adev, &fops_ib_preempt); if (IS_ERR(ent)) {