.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2011 Dmitry Eremin-Solenikov |
---|
3 | 4 | * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> |
---|
4 | 5 | * and Markus Demleitner <msdemlei@cl.uni-heidelberg.de> |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License version 2 as |
---|
8 | | - * published by the Free Software Foundation. |
---|
9 | 6 | * |
---|
10 | 7 | * This driver adds basic cpufreq support for SMU & 970FX based G5 Macs, |
---|
11 | 8 | * that is iMac G5 and latest single CPU desktop. |
---|
.. | .. |
---|
143 | 140 | |
---|
144 | 141 | static int maple_cpufreq_cpu_init(struct cpufreq_policy *policy) |
---|
145 | 142 | { |
---|
146 | | - return cpufreq_generic_init(policy, maple_cpu_freqs, 12000); |
---|
| 143 | + cpufreq_generic_init(policy, maple_cpu_freqs, 12000); |
---|
| 144 | + return 0; |
---|
147 | 145 | } |
---|
148 | 146 | |
---|
149 | 147 | static struct cpufreq_driver maple_cpufreq_driver = { |
---|
.. | .. |
---|
210 | 208 | */ |
---|
211 | 209 | valp = of_get_property(cpunode, "clock-frequency", NULL); |
---|
212 | 210 | if (!valp) |
---|
213 | | - return -ENODEV; |
---|
| 211 | + goto bail_noprops; |
---|
214 | 212 | max_freq = (*valp)/1000; |
---|
215 | 213 | maple_cpu_freqs[0].frequency = max_freq; |
---|
216 | 214 | maple_cpu_freqs[1].frequency = max_freq/2; |
---|
.. | .. |
---|
230 | 228 | maple_cpu_freqs[maple_pmode_cur].frequency/1000); |
---|
231 | 229 | |
---|
232 | 230 | rc = cpufreq_register_driver(&maple_cpufreq_driver); |
---|
233 | | - |
---|
234 | | - of_node_put(cpunode); |
---|
235 | | - |
---|
236 | | - return rc; |
---|
237 | 231 | |
---|
238 | 232 | bail_noprops: |
---|
239 | 233 | of_node_put(cpunode); |
---|