mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-20 14:18:53 +07:00
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>
This commit is contained in:
parent
afb24eabf9
commit
a8c2d62b1b
@ -1249,7 +1249,7 @@ static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
|
|||||||
break;
|
break;
|
||||||
case LIRC_GET_REC_MODE:
|
case LIRC_GET_REC_MODE:
|
||||||
if (!(features & LIRC_CAN_REC_MASK))
|
if (!(features & LIRC_CAN_REC_MASK))
|
||||||
return -ENOSYS;
|
return -ENOTTY;
|
||||||
|
|
||||||
result = put_user(LIRC_REC2MODE
|
result = put_user(LIRC_REC2MODE
|
||||||
(features & LIRC_CAN_REC_MASK),
|
(features & LIRC_CAN_REC_MASK),
|
||||||
@ -1257,21 +1257,21 @@ static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
|
|||||||
break;
|
break;
|
||||||
case LIRC_SET_REC_MODE:
|
case LIRC_SET_REC_MODE:
|
||||||
if (!(features & LIRC_CAN_REC_MASK))
|
if (!(features & LIRC_CAN_REC_MASK))
|
||||||
return -ENOSYS;
|
return -ENOTTY;
|
||||||
|
|
||||||
result = get_user(mode, uptr);
|
result = get_user(mode, uptr);
|
||||||
if (!result && !(LIRC_MODE2REC(mode) & features))
|
if (!result && !(LIRC_MODE2REC(mode) & features))
|
||||||
result = -EINVAL;
|
result = -ENOTTY;
|
||||||
break;
|
break;
|
||||||
case LIRC_GET_SEND_MODE:
|
case LIRC_GET_SEND_MODE:
|
||||||
if (!(features & LIRC_CAN_SEND_MASK))
|
if (!(features & LIRC_CAN_SEND_MASK))
|
||||||
return -ENOSYS;
|
return -ENOTTY;
|
||||||
|
|
||||||
result = put_user(LIRC_MODE_PULSE, uptr);
|
result = put_user(LIRC_MODE_PULSE, uptr);
|
||||||
break;
|
break;
|
||||||
case LIRC_SET_SEND_MODE:
|
case LIRC_SET_SEND_MODE:
|
||||||
if (!(features & LIRC_CAN_SEND_MASK))
|
if (!(features & LIRC_CAN_SEND_MASK))
|
||||||
return -ENOSYS;
|
return -ENOTTY;
|
||||||
|
|
||||||
result = get_user(mode, uptr);
|
result = get_user(mode, uptr);
|
||||||
if (!result && mode != LIRC_MODE_PULSE)
|
if (!result && mode != LIRC_MODE_PULSE)
|
||||||
|
Loading…
Reference in New Issue
Block a user