Skip to content

Commit 5f2ec35

Browse files
committed
cpufreq: intel_pstate: Rearrange variable declaration involving __free()
Follow cleanup.h recommendations and define and assign a variable in one statement when __free() is used. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Zihuan Zhang <zhangzihuan@kylinos.cn> Link: https://patch.msgid.link/2251447.irdbgypaU6@rafael.j.wysocki
1 parent c05fa40 commit 5f2ec35

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/cpufreq/intel_pstate.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,9 +1502,7 @@ static void __intel_pstate_update_max_freq(struct cpufreq_policy *policy,
15021502

15031503
static bool intel_pstate_update_max_freq(struct cpudata *cpudata)
15041504
{
1505-
struct cpufreq_policy *policy __free(put_cpufreq_policy);
1506-
1507-
policy = cpufreq_cpu_get(cpudata->cpu);
1505+
struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpudata->cpu);
15081506
if (!policy)
15091507
return false;
15101508

0 commit comments

Comments
 (0)