summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/interface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index b6bf57f25cc9..601b053bc0e5 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -688,7 +688,7 @@ int rtc_irq_set_freq(struct rtc_device *rtc, struct rtc_task *task, int freq)
int err = 0;
unsigned long flags;
- if (freq <= 0)
+ if (freq <= 0 || freq > 5000)
return -EINVAL;
spin_lock_irqsave(&rtc->irq_task_lock, flags);