]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
watchdog: wdt285: Fix variable type
authorAlexander Shiyan <shc_work@mail.ru>
Sat, 15 Feb 2014 09:23:25 +0000 (13:23 +0400)
committerWim Van Sebroeck <wim@iguana.be>
Mon, 31 Mar 2014 11:28:20 +0000 (13:28 +0200)
Variable "new_margin" is checked in the function watchdog_ioctl()
to be non-negative, so change its type to "int".

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/wdt285.c

index 7355ddd0b2073be68c78e3ced5932942c690876c..ebbb183be6182f3083a5da4ce2e75731ea1bc2ec 100644 (file)
@@ -139,9 +139,8 @@ static const struct watchdog_info ident = {
 static long watchdog_ioctl(struct file *file, unsigned int cmd,
                           unsigned long arg)
 {
-       unsigned int new_margin;
        int __user *int_arg = (int __user *)arg;
-       int ret = -ENOTTY;
+       int new_margin, ret = -ENOTTY;
 
        switch (cmd) {
        case WDIOC_GETSUPPORT: