aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-dev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 87d4add6b7f6..814583bd2fe7 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -233,7 +233,8 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file,
233 break; 233 break;
234 234
235 case RTC_PIE_ON: 235 case RTC_PIE_ON:
236 if (!capable(CAP_SYS_RESOURCE)) 236 if (rtc->irq_freq > rtc->max_user_freq &&
237 !capable(CAP_SYS_RESOURCE))
237 return -EACCES; 238 return -EACCES;
238 break; 239 break;
239 } 240 }