diff options
Diffstat (limited to 'drivers/rtc/interface.c')
-rw-r--r-- | drivers/rtc/interface.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 925006d33109..a0c01967244d 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
@@ -464,6 +464,9 @@ int rtc_irq_set_freq(struct rtc_device *rtc, struct rtc_task *task, int freq) | |||
464 | int err = 0; | 464 | int err = 0; |
465 | unsigned long flags; | 465 | unsigned long flags; |
466 | 466 | ||
467 | if (freq <= 0) | ||
468 | return -EINVAL; | ||
469 | |||
467 | spin_lock_irqsave(&rtc->irq_task_lock, flags); | 470 | spin_lock_irqsave(&rtc->irq_task_lock, flags); |
468 | if (rtc->irq_task != NULL && task == NULL) | 471 | if (rtc->irq_task != NULL && task == NULL) |
469 | err = -EBUSY; | 472 | err = -EBUSY; |