summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/w83793.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-10-19 12:12:22 +0300
committerGuenter Roeck <linux@roeck-us.net>2013-10-19 09:04:25 -0700
commit26336c8a36c0a6a28b9ecf6f1bb8c8f5605d6a21 (patch)
treec7de6fd00052d616f866c6f2525ac71d4fa5725a /drivers/hwmon/w83793.c
parent1e687e806b8ea1b1428e3e664afd4081e435f6d0 (diff)
downloadop-kernel-dev-26336c8a36c0a6a28b9ecf6f1bb8c8f5605d6a21.zip
op-kernel-dev-26336c8a36c0a6a28b9ecf6f1bb8c8f5605d6a21.tar.gz
hwmon: (w83793) Clean up a signedness issue
We cap the upper bound of "mtimeout" but since it's signed we should check for negative values as well. The mistake is harmless. But I have changed it to unsigned as a cleanup. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/w83793.c')
-rw-r--r--drivers/hwmon/w83793.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hwmon/w83793.c b/drivers/hwmon/w83793.c
index b6470ec..9d63d71 100644
--- a/drivers/hwmon/w83793.c
+++ b/drivers/hwmon/w83793.c
@@ -1199,7 +1199,8 @@ static void w83793_init_client(struct i2c_client *client)
static int watchdog_set_timeout(struct w83793_data *data, int timeout)
{
- int ret, mtimeout;
+ unsigned int mtimeout;
+ int ret;
mtimeout = DIV_ROUND_UP(timeout, 60);
OpenPOWER on IntegriCloud