aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0841-drm-amdgpu-Fix-static-checker-warning.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0841-drm-amdgpu-Fix-static-checker-warning.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0841-drm-amdgpu-Fix-static-checker-warning.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0841-drm-amdgpu-Fix-static-checker-warning.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0841-drm-amdgpu-Fix-static-checker-warning.patch
new file mode 100644
index 00000000..2d343d73
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0841-drm-amdgpu-Fix-static-checker-warning.patch
@@ -0,0 +1,38 @@
+From 590fd88e2352cb9a6500692db8cd956a9482fa0e Mon Sep 17 00:00:00 2001
+From: Rex Zhu <Rex.Zhu@amd.com>
+Date: Fri, 23 Nov 2018 18:52:21 +0800
+Subject: [PATCH 0841/2940] drm/amdgpu: Fix static checker warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c:49 amdgpu_allocate_static_csa()
+error: uninitialized symbol 'ptr'.
+
+the test if (!bo) doesn't work, as the bo is a pointer to a pointer.
+if bo create failed, the *bo will be set to NULL.
+so change to test *bo.
+
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
+index 0c590ddf250a..5b550706ee76 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
+@@ -43,7 +43,7 @@ int amdgpu_allocate_static_csa(struct amdgpu_device *adev, struct amdgpu_bo **bo
+ r = amdgpu_bo_create_kernel(adev, size, PAGE_SIZE,
+ domain, bo,
+ NULL, &ptr);
+- if (!bo)
++ if (!*bo)
+ return -ENOMEM;
+
+ memset(ptr, 0, size);
+--
+2.17.1
+