diff options
author | Nirmoy Das <nirmoy.das@amd.com> | 2021-09-02 13:27:56 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-09-14 15:35:44 -0400 |
commit | 59715cffce19cfd4f7cffcf6d7ecc18478af8c4a (patch) | |
tree | 5ab8790bf476b7f7cdddf1e54f754590f198541d /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | |
parent | bbb36348004595799a5c6df0d9e4e6f65772c2ab (diff) | |
download | linux-59715cffce19cfd4f7cffcf6d7ecc18478af8c4a.tar.bz2 |
drm/amdgpu: use IS_ERR for debugfs APIs
debugfs APIs returns encoded error so use
IS_ERR for checking return value.
v2: return PTR_ERR(ent)
References: https://gitlab.freedesktop.org/drm/amd/-/issues/1686
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-By: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index 7b634a1517f9..0554576d3695 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c @@ -428,8 +428,8 @@ int amdgpu_debugfs_ring_init(struct amdgpu_device *adev, ent = debugfs_create_file(name, S_IFREG | S_IRUGO, root, ring, &amdgpu_debugfs_ring_fops); - if (!ent) - return -ENOMEM; + if (IS_ERR(ent)) + return PTR_ERR(ent); i_size_write(ent->d_inode, ring->ring_size + 12); ring->ent = ent; |