diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-02-11 13:44:21 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-02-23 13:23:04 +0300 |
commit | a145f64c6107d3aa5a7cec9f8977d04ac2a896c9 (patch) | |
tree | 412dfda12a52778eab16abdb38175fd1feb6aacd /drivers/media | |
parent | b9c97c67fd19262c002d94ced2bfb513083e161e (diff) | |
download | linux-a145f64c6107d3aa5a7cec9f8977d04ac2a896c9.tar.xz |
media: dmxdev: fix error code for invalid ioctls
Returning -EINVAL when an ioctl is not implemented is a very
bad idea, as it is hard to distinguish from other error
contitions that an ioctl could lead. Replace it by its
right error code: -ENOTTY.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb-core/dmxdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c index c3054101c234..d87b69b86a59 100644 --- a/drivers/media/dvb-core/dmxdev.c +++ b/drivers/media/dvb-core/dmxdev.c @@ -1160,7 +1160,7 @@ static int dvb_demux_do_ioctl(struct file *file, break; #endif default: - ret = -EINVAL; + ret = -ENOTTY; break; } mutex_unlock(&dmxdev->mutex); |