Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media: v4l2-ctrls-api: fix error handling for v4l2_g_ctrl()
commit 4c76f33 upstream. As detected by Coverity, the error check logic at get_ctrl() is broken: if ptr_to_user() fails to fill a control due to an error, no errors are returned and v4l2_g_ctrl() returns success on a failed operation, which may cause applications to fail. Add an error check at get_ctrl() and ensure that it will be returned to userspace without filling the control value if get_ctrl() fails. Fixes: 71c689d ("media: v4l2-ctrls: split up into four source files") Cc: [email protected] Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information