[media] lirc: return ENOTTY when ioctl is not supported

We shouldn't be using ENOSYS when a feature is not available. I've tested
lirc; nothing is broken as far as I can make out.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Sean Young
2017-01-26 15:19:33 -02:00
committed by Mauro Carvalho Chehab
parent a8b875a549
commit 5c86275869
2 changed files with 11 additions and 11 deletions

View File

@@ -623,7 +623,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
result = put_user(ir->d.max_timeout, (__u32 __user *)arg);
break;
default:
result = -EINVAL;
result = -ENOTTY;
}
mutex_unlock(&ir->irctl_lock);