提交 26336c8a 编写于 作者: D Dan Carpenter 提交者: Guenter Roeck

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
上级 1e687e80
...@@ -1199,7 +1199,8 @@ static void w83793_init_client(struct i2c_client *client) ...@@ -1199,7 +1199,8 @@ static void w83793_init_client(struct i2c_client *client)
static int watchdog_set_timeout(struct w83793_data *data, int timeout) 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); mtimeout = DIV_ROUND_UP(timeout, 60);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册