summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2018-02-11 05:44:21 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:49:01 +0200
commit3aa7280c97ddc275d9acb15cf76b3b30cb7cd5dc (patch)
treed54608a8f009f7c02f37759bea3a82d753feabff
parent24cdc06fcf9dc32243a7e2693e3df3336ec5a7ef (diff)
downloadlinux-stable-3aa7280c97ddc275d9acb15cf76b3b30cb7cd5dc.tar.gz
linux-stable-3aa7280c97ddc275d9acb15cf76b3b30cb7cd5dc.tar.bz2
linux-stable-3aa7280c97ddc275d9acb15cf76b3b30cb7cd5dc.zip
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>
-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 ea9abde902e9..209db65ab610 100644
--- a/drivers/media/dvb-core/dmxdev.c
+++ b/drivers/media/dvb-core/dmxdev.c
@@ -1071,7 +1071,7 @@ static int dvb_demux_do_ioctl(struct file *file,
break;
default:
- ret = -EINVAL;
+ ret = -ENOTTY;
break;
}
mutex_unlock(&dmxdev->mutex);