Konstantin Demin
8cbaf1dea2
3rd patchs (in alphabetical order): - bbr3 - ntsync5 - openwrt - pf-kernel - xanmod - zen no configuration changes for now
25 lines
867 B
Diff
25 lines
867 B
Diff
From 185e64a7e1a749593f3d6dadc666da9dda82d48c Mon Sep 17 00:00:00 2001
|
|
From: Qianqiang Liu <qianqiang.liu@163.com>
|
|
Date: Wed, 11 Sep 2024 07:39:24 +0800
|
|
Subject: cpufreq/amd-pstate-ut: Fix an "Uninitialized variables" issue
|
|
|
|
Using uninitialized value "mode2" when calling "amd_pstate_get_mode_string".
|
|
Set "mode2" to "AMD_PSTATE_DISABLE" by default.
|
|
|
|
Signed-off-by: Qianqiang Liu <qianqiang.liu@163.com>
|
|
---
|
|
drivers/cpufreq/amd-pstate-ut.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/cpufreq/amd-pstate-ut.c
|
|
+++ b/drivers/cpufreq/amd-pstate-ut.c
|
|
@@ -270,7 +270,7 @@ static int amd_pstate_set_mode(enum amd_
|
|
|
|
static void amd_pstate_ut_check_driver(u32 index)
|
|
{
|
|
- enum amd_pstate_mode mode1, mode2;
|
|
+ enum amd_pstate_mode mode1, mode2 = AMD_PSTATE_DISABLE;
|
|
int ret;
|
|
|
|
for (mode1 = AMD_PSTATE_DISABLE; mode1 < AMD_PSTATE_MAX; mode1++) {
|