diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-12-12 08:05:33 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2014-01-03 04:33:30 +0000 |
commit | cf3f5a3dbf78b72541dc9f295101cb90a5465d5c (patch) | |
tree | 3c8699fb0d4476eb04e8ca8b62596823fbe573b0 /kernel | |
parent | 362ab737e651f41282a979b9275717537b99451d (diff) |
hwmon: Prevent some divide by zeros in FAN_TO_REG()
commit 3806b45ba4655147a011df03242cc197ab986c43 upstream.
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: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Roger Lucas <vt8231@hiddenengine.co.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions