Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9110b1c authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman
Browse files

[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: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 08e7e278
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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