summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkbuild test robot <fengguang.wu@intel.com>2018-09-12 08:59:07 +0800
committerAlex Deucher <alexander.deucher@amd.com>2018-09-12 16:29:57 -0500
commit8901a65f080ad6f4d7c3ef9f23c6f3a0e3e194aa (patch)
tree0da1c3b1b8e4002ad39a0398cee018bf09f1d946
parenta94d5569b23209306220fabb2a8d42d0f966d318 (diff)
drm/amd/display: fix ptr_ret.cocci warnings
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c:771:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: e498eb713604 ("drm/amd/display: Add support for hw_state logging via debugfs") CC: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c5
1 files changed, 1 insertions, 4 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 35ca732f7ffe..0ef4a40d2247 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
@@ -801,8 +801,5 @@ int dtn_debugfs_init(struct amdgpu_device *adev)
adev,
&dtn_log_fops);
- if (IS_ERR(ent))
- return PTR_ERR(ent);
-
- return 0;
+ return PTR_ERR_OR_ZERO(ent);
}