aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0355-drm-amd-display-fix-ptr_ret.cocci-warnings.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0355-drm-amd-display-fix-ptr_ret.cocci-warnings.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0355-drm-amd-display-fix-ptr_ret.cocci-warnings.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0355-drm-amd-display-fix-ptr_ret.cocci-warnings.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0355-drm-amd-display-fix-ptr_ret.cocci-warnings.patch
new file mode 100644
index 00000000..887e7233
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0355-drm-amd-display-fix-ptr_ret.cocci-warnings.patch
@@ -0,0 +1,36 @@
+From 77c604cc2ee1b47ead13e504007b12f174f1249a Mon Sep 17 00:00:00 2001
+From: kbuild test robot <fengguang.wu@intel.com>
+Date: Wed, 12 Sep 2018 08:59:07 +0800
+Subject: [PATCH 0355/2940] 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>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 5 +----
+ 1 file changed, 1 insertion(+), 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);
+ }
+--
+2.17.1
+