Module Name: src
Committed By: sevan
Date: Fri Mar 9 11:05:56 UTC 2018
Modified Files:
src/sys/arch/macppc/dev: smu.c
Log Message:
Initialise ret to avoid returning uninitialised value if the if statement is
false. Found when building the POWERMAC_G5 kernel with clang.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/macppc/dev/smu.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/macppc/dev/smu.c
diff -u src/sys/arch/macppc/dev/smu.c:1.3 src/sys/arch/macppc/dev/smu.c:1.4
--- src/sys/arch/macppc/dev/smu.c:1.3 Sun Oct 1 05:15:52 2017
+++ src/sys/arch/macppc/dev/smu.c Fri Mar 9 11:05:56 2018
@@ -710,6 +710,7 @@ static int
smu_fan_get_rpm(struct smu_fan *fan, int *rpm)
{
int ret;
+ ret = 0;
if (time_uptime - fan->last_update > 1) {
ret = smu_fan_update_rpm(fan);