[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20190525073449.GA7278@hari-Inspiron-1545>
Date: Sat, 25 May 2019 13:04:49 +0530
From: Hariprasad Kelam <hariprasad.kelam@...il.com>
To: Harry Wentland <harry.wentland@....com>,
Leo Li <sunpeng.li@....com>,
Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
"David (ChunMing) Zhou" <David1.Zhou@....com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
hersen wu <hersenxs.wu@....com>,
Nicholas Kazlauskas <nicholas.kazlauskas@....com>,
David Francis <David.Francis@....com>,
Hariprasad Kelam <hariprasad.kelam@...il.com>,
kbuild test robot <fengguang.wu@...el.com>,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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 <hariprasad.kelam@...il.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
index 1d5fc5a..1b1ec12 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
@@ -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);
}
--
2.7.4
Powered by blists - more mailing lists