aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc')
-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)
688 int err = 0; 688 int err = 0;
689 unsigned long flags; 689 unsigned long flags;
690 690
691 if (freq <= 0) 691 if (freq <= 0 || freq > 5000)
692 return -EINVAL; 692 return -EINVAL;
693 693
694 spin_lock_irqsave(&rtc->irq_task_lock, flags); 694 spin_lock_irqsave(&rtc->irq_task_lock, flags);