| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> |
|---|
| 3 | 4 | * 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. |
|---|
| 8 | 5 | * |
|---|
| 9 | 6 | * This driver adds basic cpufreq support for SMU & 970FX based G5 Macs, |
|---|
| 10 | 7 | * that is iMac G5 and latest single CPU desktop. |
|---|
| .. | .. |
|---|
| 324 | 321 | |
|---|
| 325 | 322 | static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy) |
|---|
| 326 | 323 | { |
|---|
| 327 | | - return cpufreq_generic_init(policy, g5_cpu_freqs, transition_latency); |
|---|
| 324 | + cpufreq_generic_init(policy, g5_cpu_freqs, transition_latency); |
|---|
| 325 | + return 0; |
|---|
| 328 | 326 | } |
|---|
| 329 | 327 | |
|---|
| 330 | 328 | static struct cpufreq_driver g5_cpufreq_driver = { |
|---|
| .. | .. |
|---|
| 411 | 409 | pfunc_set_vdnap0 = pmf_find_function(root, "set-vdnap0"); |
|---|
| 412 | 410 | pfunc_vdnap0_complete = |
|---|
| 413 | 411 | pmf_find_function(root, "slewing-done"); |
|---|
| 412 | + of_node_put(root); |
|---|
| 414 | 413 | if (pfunc_set_vdnap0 == NULL || |
|---|
| 415 | 414 | pfunc_vdnap0_complete == NULL) { |
|---|
| 416 | 415 | pr_err("Can't find required platform function\n"); |
|---|