Commit 40a8962a authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Greg Kroah-Hartman

media: dmxdev: fix error code for invalid ioctls

[ Upstream commit a145f64c ]

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: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 515702e0
...@@ -1071,7 +1071,7 @@ static int dvb_demux_do_ioctl(struct file *file, ...@@ -1071,7 +1071,7 @@ static int dvb_demux_do_ioctl(struct file *file,
break; break;
default: default:
ret = -EINVAL; ret = -ENOTTY;
break; break;
} }
mutex_unlock(&dmxdev->mutex); mutex_unlock(&dmxdev->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment