1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

uninitialised value caused some lmenv(4) fans to never appear sometimes;

the bug was reported long time ago by Simon Slaytor with adm9240;
the eyes were cleared today by LLVM/Clang Static Analyser;  ok deraadt
This commit is contained in:
cnst 2008-11-10 05:19:48 +00:00
parent 310c3073a2
commit a0148e891d

View File

@ -1,4 +1,4 @@
/* $OpenBSD: lm87.c,v 1.19 2007/06/24 05:34:35 dlg Exp $ */
/* $OpenBSD: lm87.c,v 1.20 2008/11/10 05:19:48 cnst Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis
@ -141,7 +141,8 @@ lmenv_attach(struct device *parent, struct device *self, void *aux)
printf(", cannot read Channel register\n");
return;
}
}
} else
channel = 0;
cmd = LM87_CONFIG1;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,