projects/linux·commit c8ed39eb

rtc-dev: Make RTC driver return ENOTTY instead of ENOIOCTLCMD

c8ed39eb · Thomas Hommel <[email protected]> · 2007-07-31 00:37:31 -07:00

Prevent the RTC driver from returning ENOIOCTLCMD to userspace.

Signed-off-by: Thomas Hommel <[email protected]>
Acked-by: Alessandro Zummo <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
c8ed39ebe0cf490abd7bf7c77b728dd6fefb2cf8
Parents
a8bbf72a

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 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