aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-05-02 17:08:22 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-22 00:51:54 -0400
commitb9110b1c893f45ec66ae39e359decdfad84525be (patch)
tree0fcb89b2f770df7995445b4e74251549bea6baf6
parent08e7e2789e0da49eadeb17121e24af22efeee84b (diff)
[PATCH] I2C: Fix bugs in the new w83627ehf driver
These are the fixes for the bug you spotted in my new w83627ehf driver: - Explicit division by 0. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/i2c/chips/w83627ehf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/chips/w83627ehf.c b/drivers/i2c/chips/w83627ehf.c
index 7bb693d29784..4fcc823e89b5 100644
--- a/drivers/i2c/chips/w83627ehf.c
+++ b/drivers/i2c/chips/w83627ehf.c
@@ -450,7 +450,7 @@ store_fan_min(struct device *dev, const char *buf, size_t count, int nr)
450 data->fan_min[nr] = 1; 450 data->fan_min[nr] = 1;
451 new_div = 0; /* 1 == (1 << 0) */ 451 new_div = 0; /* 1 == (1 << 0) */
452 dev_warn(dev, "fan%u low limit %u above maximum %u, set to " 452 dev_warn(dev, "fan%u low limit %u above maximum %u, set to "
453 "maximum\n", nr + 1, val, fan_from_reg(1, 0)); 453 "maximum\n", nr + 1, val, fan_from_reg(1, 1));
454 } else { 454 } else {
455 /* Automatically pick the best divider, i.e. the one such 455 /* Automatically pick the best divider, i.e. the one such
456 that the min limit will correspond to a register value 456 that the min limit will correspond to a register value