Skip to content

Commit a8c2d62

Browse files
Yves Leméemchehab
authored andcommitted
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 <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent afb24ea commit a8c2d62

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/staging/media/lirc/lirc_zilog.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,29 +1249,29 @@ static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
12491249
break;
12501250
case LIRC_GET_REC_MODE:
12511251
if (!(features & LIRC_CAN_REC_MASK))
1252-
return -ENOSYS;
1252+
return -ENOTTY;
12531253

12541254
result = put_user(LIRC_REC2MODE
12551255
(features & LIRC_CAN_REC_MASK),
12561256
uptr);
12571257
break;
12581258
case LIRC_SET_REC_MODE:
12591259
if (!(features & LIRC_CAN_REC_MASK))
1260-
return -ENOSYS;
1260+
return -ENOTTY;
12611261

12621262
result = get_user(mode, uptr);
12631263
if (!result && !(LIRC_MODE2REC(mode) & features))
1264-
result = -EINVAL;
1264+
result = -ENOTTY;
12651265
break;
12661266
case LIRC_GET_SEND_MODE:
12671267
if (!(features & LIRC_CAN_SEND_MASK))
1268-
return -ENOSYS;
1268+
return -ENOTTY;
12691269

12701270
result = put_user(LIRC_MODE_PULSE, uptr);
12711271
break;
12721272
case LIRC_SET_SEND_MODE:
12731273
if (!(features & LIRC_CAN_SEND_MASK))
1274-
return -ENOSYS;
1274+
return -ENOTTY;
12751275

12761276
result = get_user(mode, uptr);
12771277
if (!result && mode != LIRC_MODE_PULSE)

0 commit comments

Comments
 (0)