[PATCH] hwmon: Fix missing it87 fan div init
commit4e980ac962bc77d292ad4039631553dd2a88d47f
authorJean Delvare <khali@linux-fr.org>
Mon, 21 Nov 2005 18:22:16 +0000 (21 19:22 +0100)
committerChris Wright <chrisw@osdl.org>
Thu, 24 Nov 2005 22:10:12 +0000 (24 14:10 -0800)
tree565adf651a5803ac5fdb5ee3d6f255ac91829622
parentce79890ea55a84b3600bbee421be78117c2532bb
[PATCH] hwmon: Fix missing it87 fan div init

Fix a bug where setting the low fan speed limits will not work if no
data was ever read through the sysfs interface and the fan clock
dividers have not been explicitely set yet either. The reason is that
data->fan_div[nr] may currently be used before it is initialized from
the chip register values. The fix is to explicitely initialize
data->fan_div[nr] before using it.

Bug reported, and fix tested, by Nicolas Mailhot.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@osdl.org>
drivers/hwmon/it87.c