diff --git a/[refs] b/[refs] index 2977d1022428..c9601058771b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a8edd74e4404d011ab821d5bf35b27335d26f001 +refs/heads/master: 80060362aaefec507ac2d7a7bd156716d7a7ca91 diff --git a/trunk/drivers/char/watchdog/iTCO_wdt.c b/trunk/drivers/char/watchdog/iTCO_wdt.c index 505aae917764..b6f29cb8bd39 100644 --- a/trunk/drivers/char/watchdog/iTCO_wdt.c +++ b/trunk/drivers/char/watchdog/iTCO_wdt.c @@ -368,7 +368,8 @@ static int iTCO_wdt_get_timeleft (int *time_left) spin_unlock(&iTCO_wdt_private.io_lock); *time_left = (val8 * 6) / 10; - } + } else + return -EINVAL; return 0; } @@ -439,7 +440,6 @@ static int iTCO_wdt_ioctl (struct inode *inode, struct file *file, { int new_options, retval = -EINVAL; int new_heartbeat; - int time_left; void __user *argp = (void __user *)arg; int __user *p = argp; static struct watchdog_info ident = { @@ -499,6 +499,8 @@ static int iTCO_wdt_ioctl (struct inode *inode, struct file *file, case WDIOC_GETTIMELEFT: { + int time_left; + if (iTCO_wdt_get_timeleft(&time_left)) return -EINVAL;