aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-core/dmxdev.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2018-02-11 05:44:21 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-02-23 05:23:04 -0500
commita145f64c6107d3aa5a7cec9f8977d04ac2a896c9 (patch)
tree412dfda12a52778eab16abdb38175fd1feb6aacd /drivers/media/dvb-core/dmxdev.c
parentb9c97c67fd19262c002d94ced2bfb513083e161e (diff)
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/dvb-core/dmxdev.c')
-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,
1160 break; 1160 break;
1161#endif 1161#endif
1162 default: 1162 default:
1163 ret = -EINVAL; 1163 ret = -ENOTTY;
1164 break; 1164 break;
1165 } 1165 }
1166 mutex_unlock(&dmxdev->mutex); 1166 mutex_unlock(&dmxdev->mutex);