Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b86d81c authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Greg Kroah-Hartman
Browse files

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: 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 836053fd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1069,7 +1069,7 @@ static int dvb_demux_do_ioctl(struct file *file,
		break;

	default:
		ret = -EINVAL;
		ret = -ENOTTY;
		break;
	}
	mutex_unlock(&dmxdev->mutex);