rtc-dev: Make RTC driver return ENOTTY instead of ENOIOCTLCMD
Changes
1 files changed · +2 −0
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| drivers/rtc/rtc-dev.c | modified | +2 | −0 | View file |
drivers/rtc/rtc-dev.c
View filediff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 3045359..005fff3 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -348,6 +348,8 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file,
case RTC_IRQP_SET:
if (ops->irq_set_freq)
err = rtc_irq_set_freq(rtc, rtc->irq_task, arg);
+ else
+ err = -ENOTTY;
break;
#if 0