Skip to content

Commit

Permalink
[PATCH] I2C: Fix bugs in the new w83627ehf driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Jun 22, 2005
1 parent 08e7e27 commit b9110b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/chips/w83627ehf.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ store_fan_min(struct device *dev, const char *buf, size_t count, int nr)
data->fan_min[nr] = 1;
new_div = 0; /* 1 == (1 << 0) */
dev_warn(dev, "fan%u low limit %u above maximum %u, set to "
"maximum\n", nr + 1, val, fan_from_reg(1, 0));
"maximum\n", nr + 1, val, fan_from_reg(1, 1));
} else {
/* Automatically pick the best divider, i.e. the one such
that the min limit will correspond to a register value
Expand Down

0 comments on commit b9110b1

Please sign in to comment.