Skip to content
Commit 3806b45b authored by Dan Carpenter's avatar Dan Carpenter Committed by Jean Delvare
Browse files

hwmon: Prevent some divide by zeros in FAN_TO_REG()



The "rpm * div" operations can overflow here, so this patch adds an
upper limit to rpm to prevent that.  Jean Delvare helped me with this
patch.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarRoger Lucas <vt8231@hiddenengine.co.uk>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 33a7ab91
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment