Browse Source

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>
Guenter Roeck 11 years ago
parent
commit
67b9fbdf36
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/watchdog/ts72xx_wdt.c

+ 1 - 1
drivers/watchdog/ts72xx_wdt.c

@@ -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))