summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2018-02-11 11:44:21 +0100
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-02-23 11:23:04 +0100
commita145f64c6107d3aa5a7cec9f8977d04ac2a896c9 (patch)
tree412dfda12a52778eab16abdb38175fd1feb6aacd /drivers
parentmedia: m88ds3103: don't call a non-initalized function (diff)
downloadlinux-a145f64c6107d3aa5a7cec9f8977d04ac2a896c9.tar.xz
linux-a145f64c6107d3aa5a7cec9f8977d04ac2a896c9.zip
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')
-rw-r--r--drivers/media/dvb-core/dmxdev.c2
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);