aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3958-drm-amd-pp-silence-a-static-checker-warning.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3958-drm-amd-pp-silence-a-static-checker-warning.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3958-drm-amd-pp-silence-a-static-checker-warning.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3958-drm-amd-pp-silence-a-static-checker-warning.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3958-drm-amd-pp-silence-a-static-checker-warning.patch
new file mode 100644
index 00000000..551021f2
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3958-drm-amd-pp-silence-a-static-checker-warning.patch
@@ -0,0 +1,42 @@
+From 529b315d6ae37f647f290a8ccc7a73befb32d1eb Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Fri, 23 Mar 2018 14:39:03 +0300
+Subject: [PATCH 3958/4131] drm/amd/pp: silence a static checker warning
+
+This has a static checker warning because "frev" and "crev" can be
+uninitialized if "info" is NULL. I just changed the order of the checks
+so that we check "info" first.
+
+Change-Id: Id770f927f541f6e0df3540b8edf4d4e4fb07a177
+Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
+Reviewed-by: Huang Rui <ray.huang@amd.com>
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c
+index 75a465f..7b26607 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c
+@@ -319,13 +319,13 @@ static int smu8_get_system_info_data(struct pp_hwmgr *hwmgr)
+ GetIndexIntoMasterTable(DATA, IntegratedSystemInfo),
+ &size, &frev, &crev);
+
+- if (crev != 9) {
+- pr_err("Unsupported IGP table: %d %d\n", frev, crev);
++ if (info == NULL) {
++ pr_err("Could not retrieve the Integrated System Info Table!\n");
+ return -EINVAL;
+ }
+
+- if (info == NULL) {
+- pr_err("Could not retrieve the Integrated System Info Table!\n");
++ if (crev != 9) {
++ pr_err("Unsupported IGP table: %d %d\n", frev, crev);
+ return -EINVAL;
+ }
+
+--
+2.7.4
+