summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYves Lemée <yves.lemee.kernel@gmail.com>2017-07-12 15:17:37 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-20 09:47:28 -0400
commita8c2d62b1bddf5fa4d23a380be8904e5593c2b40 (patch)
tree33b5429d210f9a2e0f528746d553442f0daf93fc /drivers
parentafb24eabf9e63c99d01aaf1b4d04f1d9a458e029 (diff)
downloadlinux-a8c2d62b1bddf5fa4d23a380be8904e5593c2b40.tar.bz2
media: lirc_zilog: Clean up lirc zilog error codes
According the coding style guidelines, the ENOSYS error code must be returned in case of a non existent system call. This code has been replaced with the ENOTTY error code indicating a missing functionality. Signed-off-by: Yves Lemée <yves.lemee.kernel@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/media/lirc/lirc_zilog.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c
index 015e41bd036e..26dd32d5b5b2 100644
--- a/drivers/staging/media/lirc/lirc_zilog.c
+++ b/drivers/staging/media/lirc/lirc_zilog.c
@@ -1249,7 +1249,7 @@ static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
break;
case LIRC_GET_REC_MODE:
if (!(features & LIRC_CAN_REC_MASK))
- return -ENOSYS;
+ return -ENOTTY;
result = put_user(LIRC_REC2MODE
(features & LIRC_CAN_REC_MASK),
@@ -1257,21 +1257,21 @@ static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
break;
case LIRC_SET_REC_MODE:
if (!(features & LIRC_CAN_REC_MASK))
- return -ENOSYS;
+ return -ENOTTY;
result = get_user(mode, uptr);
if (!result && !(LIRC_MODE2REC(mode) & features))
- result = -EINVAL;
+ result = -ENOTTY;
break;
case LIRC_GET_SEND_MODE:
if (!(features & LIRC_CAN_SEND_MASK))
- return -ENOSYS;
+ return -ENOTTY;
result = put_user(LIRC_MODE_PULSE, uptr);
break;
case LIRC_SET_SEND_MODE:
if (!(features & LIRC_CAN_SEND_MASK))
- return -ENOSYS;
+ return -ENOTTY;
result = get_user(mode, uptr);
if (!result && mode != LIRC_MODE_PULSE)