diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2022-05-18 14:06:31 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-09-27 10:24:43 +0200 |
commit | f0da34f32920c16f34acb692cf1646465bd40c04 (patch) | |
tree | 4c72de99811873ca3f15401ae6fc8fe5e4d6217c /lib/mpi/mpi-sub-ui.c | |
parent | 4e768c8e34e639cff66a0f175bc4aebf472e4305 (diff) |
media: v4l2-ioctl.c: fix incorrect error path
If allocating array_buf fails, or copying data from userspace into that
buffer fails, then just free memory and return the error. Don't attempt
to call video_put_user() since there is no point, and it would copy back
data on error even if INFO_FL_ALWAYS_COPY wasn't set.
So if writing the array back to userspace fails, then don't go to
out_array_args, instead just continue with the regular code that just
returns the error unless 'always_copy' is set.
Update the VIDIOC_G/S/TRY_EXT_CTRLS ioctls to set the ALWAYS_COPY flag
since they now need it. Before this worked due to this buggy code, but
now that that is fixed these ioctls need to set this flag explicitly.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions