Skip to content

Commit dee8f20

Browse files
committed
Merge branch 'pm-cpufreq'
Merge an amd-pstate driver fix for 6.10-rc1: - Fix a memory leak in the exit path of amd-pstate (Peng Ma). * pm-cpufreq: cpufreq: amd-pstate: fix memory leak on CPU EPP exit
2 parents 8bd6d5f + cea04f3 commit dee8f20

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,6 +1441,13 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
14411441

14421442
static int amd_pstate_epp_cpu_exit(struct cpufreq_policy *policy)
14431443
{
1444+
struct amd_cpudata *cpudata = policy->driver_data;
1445+
1446+
if (cpudata) {
1447+
kfree(cpudata);
1448+
policy->driver_data = NULL;
1449+
}
1450+
14441451
pr_debug("CPU %d exiting\n", policy->cpu);
14451452
return 0;
14461453
}

0 commit comments

Comments
 (0)