summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/watchdog/ux500_wdt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/watchdog/ux500_wdt.c b/drivers/watchdog/ux500_wdt.c
index 52747e59172..a1e8c2dbf10 100644
--- a/drivers/watchdog/ux500_wdt.c
+++ b/drivers/watchdog/ux500_wdt.c
@@ -44,6 +44,9 @@ static bool safe_close;
static int ux500_wdt_open(struct inode *inode, struct file *file)
{
+ if (!timeout)
+ return -ENODEV;
+
if (test_and_set_bit(WDT_FLAGS_OPEN, &wdt_flags))
return -EBUSY;