From 67b9fbdf3602dfd525371d7b1f49346f1d11d37d Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Mon, 14 Oct 2013 09:32:48 -0700 Subject: [PATCH] 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 Signed-off-by: Wim Van Sebroeck --- drivers/watchdog/ts72xx_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c index df5dd55b9b3a..09d4831aa61f 100644 --- a/drivers/watchdog/ts72xx_wdt.c +++ b/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))