Skip to content

Commit 1dcfef6

Browse files
author
Fox Snowpatch
committed
1 parent 85ff933 commit 1dcfef6

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

drivers/cpufreq/pmac64-cpufreq.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,10 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode)
356356
use_volts_smu = 1;
357357
else if (of_machine_is_compatible("PowerMac11,2"))
358358
use_volts_vdnap = 1;
359-
else
360-
return -ENODEV;
359+
else {
360+
rc = -ENODEV;
361+
goto bail_noprops;
362+
}
361363

362364
/* Check 970FX for now */
363365
valp = of_get_property(cpunode, "cpu-version", NULL);
@@ -430,8 +432,11 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode)
430432
* supporting anything else.
431433
*/
432434
valp = of_get_property(cpunode, "clock-frequency", NULL);
433-
if (!valp)
434-
return -ENODEV;
435+
if (!valp) {
436+
rc = -ENODEV;
437+
goto bail_noprops;
438+
}
439+
435440
max_freq = (*valp)/1000;
436441
g5_cpu_freqs[0].frequency = max_freq;
437442
g5_cpu_freqs[1].frequency = max_freq/2;

0 commit comments

Comments
 (0)