drm/amd: fix warning PTR_ERR_OR_ZERO can be used
Subsystems (3)
PATCH 1/1 drm/amd: fix warning PTR_ERR_OR_ZERO can be used
fix below warnings reported by coccicheck
./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c:1057:1-3:
WARNING: PTR_ERR_OR_ZERO can be used
Signed-off-by Hariprasad Kelam <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +1 -3
@@ -1054,8 +1054,6 @@ int dtn_debugfs_init(struct amdgpu_device *adev) ent =debugfs_create_file_unsafe ("amdgpu_dm_visual_confirm" ,0644 , root, adev, &visual_confirm_fops); -if (IS_ERR (ent)) -return PTR_ERR (ent); -return 0 ; +return PTR_ERR_OR_ZERO (ent); }
Signature · 1 line
2.7.4