watchdog: ts72xx_wdt: Propagate return value from timeout_to_regval

timeout_to_regval() returns a valid error code. Might as well use it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This commit is contained in:
Guenter Roeck 2013-10-14 09:32:48 -07:00 committed by Wim Van Sebroeck
parent 5412df0bda
commit 67b9fbdf36

View File

@ -192,7 +192,7 @@ static int ts72xx_wdt_open(struct inode *inode, struct file *file)
dev_err(&wdt->pdev->dev,
"failed to convert timeout (%d) to register value\n",
timeout);
return -EINVAL;
return regval;
}
if (mutex_lock_interruptible(&wdt->lock))