From cf3f5a3dbf78b72541dc9f295101cb90a5465d5c Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 12 Dec 2013 08:05:33 +0100 Subject: [PATCH] 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 Acked-by: Roger Lucas Signed-off-by: Jean Delvare [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings --- Reading git-format-patch failed