diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-02-11 13:44:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-25 17:17:55 +0300 |
commit | 07999bccf2e01312bc299c60aca1b18ba83626be (patch) | |
tree | 313648042ed4c8bf53d7c1e3e989218ee55c23a2 /drivers/media | |
parent | 7bc147610d1e74ca70ffb8a48d8fc44621bfc760 (diff) | |
download | linux-07999bccf2e01312bc299c60aca1b18ba83626be.tar.xz |
media: dmxdev: fix error code for invalid ioctls
[ Upstream commit a145f64c6107d3aa5a7cec9f8977d04ac2a896c9 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 18e4230865be..51009b2718a3 100644 --- a/drivers/media/dvb-core/dmxdev.c +++ b/drivers/media/dvb-core/dmxdev.c @@ -1055,7 +1055,7 @@ static int dvb_demux_do_ioctl(struct file *file, break; default: - ret = -EINVAL; + ret = -ENOTTY; break; } mutex_unlock(&dmxdev->mutex); |