projects/linux·commit ac495bf8

rtc-dev: return -ENOTTY in ioctl if irq_set_freq is not implemented by driver

ac495bf8 · Hans-Christian Egtvedt <[email protected]> · 2007-07-17 04:05:00 -07:00

Signed-off-by: Hans-Christian Egtvedt <[email protected]>
Cc: Haavard Skinnemoen <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
ac495bf8971f2dc9d401d892849977e86633ced6
Parents
7a39a49c

Changes

1 files changed · +2 −0

FileStatusAddDelContent
drivers/rtc/rtc-dev.cmodified+2−0View file

drivers/rtc/rtc-dev.c

View file
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index f4e5f00..3045359 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -341,6 +341,8 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file,
case RTC_IRQP_READ:
if (ops->irq_set_freq)
err = put_user(rtc->irq_freq, (unsigned long __user *)uarg);
+ else
+ err = -ENOTTY;
break;
case RTC_IRQP_SET: