Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1436428
| From | Hans Verkuil <hverkuil@xs4all.nl> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 12/15] [media] lirc_dev: fix error return value |
| Date | 2016-07-04 13:50 +0200 |
| Message-ID | <rRaxX-55H-1@gated-at.bofh.it> (permalink) |
| References | <rQ1Gp-4bf-7@gated-at.bofh.it> <rQ29r-4m1-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 07/01/2016 10:01 AM, Andi Shyti wrote:
> 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.
I'd say it is ENOTTY, i.e. this hardware does not support this ioctl.
Regards,
Hans
>
> 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 689e369..99d1f98 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;
> }
>
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/15] lirc_dev fixes and beautification Andi Shyti <andi.shyti@samsung.com> - 2016-07-01 10:20 +0200
[PATCH v2 14/15] [media] lirc_dev: fix potential segfault Andi Shyti <andi.shyti@samsung.com> - 2016-07-01 10:30 +0200
[PATCH v2 02/15] [media] lirc_dev: allow bufferless driver registration Andi Shyti <andi.shyti@samsung.com> - 2016-07-01 10:30 +0200
Re: [PATCH v2 02/15] [media] lirc_dev: allow bufferless driver registration Sean Young <sean@mess.org> - 2016-07-02 19:20 +0200
[PATCH v2 12/15] [media] lirc_dev: fix error return value Andi Shyti <andi.shyti@samsung.com> - 2016-07-01 10:40 +0200
Re: [PATCH v2 12/15] [media] lirc_dev: fix error return value Hans Verkuil <hverkuil@xs4all.nl> - 2016-07-04 13:50 +0200
[PATCH v2 11/15] [media] lirc_dev: fix variable constant comparisons Andi Shyti <andi.shyti@samsung.com> - 2016-07-01 10:40 +0200
[PATCH v2 09/15] [media] lirc_dev: merge three if statements in only one Andi Shyti <andi.shyti@samsung.com> - 2016-07-01 11:20 +0200
csiph-web