hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/cpufreq/pmac64-cpufreq.c
....@@ -1,10 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org>
34 * and Markus Demleitner <msdemlei@cl.uni-heidelberg.de>
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 as
7
- * published by the Free Software Foundation.
85 *
96 * This driver adds basic cpufreq support for SMU & 970FX based G5 Macs,
107 * that is iMac G5 and latest single CPU desktop.
....@@ -324,7 +321,8 @@
324321
325322 static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy)
326323 {
327
- return cpufreq_generic_init(policy, g5_cpu_freqs, transition_latency);
324
+ cpufreq_generic_init(policy, g5_cpu_freqs, transition_latency);
325
+ return 0;
328326 }
329327
330328 static struct cpufreq_driver g5_cpufreq_driver = {
....@@ -411,6 +409,7 @@
411409 pfunc_set_vdnap0 = pmf_find_function(root, "set-vdnap0");
412410 pfunc_vdnap0_complete =
413411 pmf_find_function(root, "slewing-done");
412
+ of_node_put(root);
414413 if (pfunc_set_vdnap0 == NULL ||
415414 pfunc_vdnap0_complete == NULL) {
416415 pr_err("Can't find required platform function\n");