Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1433735
| From | Andi Shyti <andi.shyti@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 12/15] lirc_dev: fix error return value |
| Date | 2016-06-29 15:30 +0200 |
| Message-ID | <rPnJ5-4Hd-43@gated-at.bofh.it> (permalink) |
| References | <rPnIZ-4Hd-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
If ioctl is called, it cannot be a case of invalid system call
number (ENOSYS), that is an operation not permitted (EPERM).
Replace ENOSYS with EPERM.
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
---
drivers/media/rc/lirc_dev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index 7e5cb85..6f3402c 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -587,7 +587,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
break;
case LIRC_GET_REC_MODE:
if (!(ir->d.features & LIRC_CAN_REC_MASK)) {
- result = -ENOSYS;
+ result = -EPERM;
break;
}
@@ -597,7 +597,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
break;
case LIRC_SET_REC_MODE:
if (!(ir->d.features & LIRC_CAN_REC_MASK)) {
- result = -ENOSYS;
+ result = -EPERM;
break;
}
@@ -615,7 +615,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case LIRC_GET_MIN_TIMEOUT:
if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) ||
ir->d.min_timeout == 0) {
- result = -ENOSYS;
+ result = -EPERM;
break;
}
@@ -624,7 +624,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case LIRC_GET_MAX_TIMEOUT:
if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) ||
ir->d.max_timeout == 0) {
- result = -ENOSYS;
+ result = -EPERM;
break;
}
--
2.8.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 12/15] lirc_dev: fix error return value Andi Shyti <andi.shyti@samsung.com> - 2016-06-29 15:30 +0200
csiph-web