Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[media] soc_camera: fix VIDIOC_S_CROP ioctl
Sometimes VIDIOC_S_CROP ioctl doesn't work, soc-camera driver reports: soc-camera-pdrv soc-camera-pdrv.0: S_CROP denied: getting current crop failed The VIDIOC_G_CROP documentation states that the type field needs to be set to the respective buffer type when querying, so the check in .g_crop() of the subdevices returns -EINVAL if the type is not set properly. Here the uninitialized local variable 'current_crop' is passed to the .g_crop() and this leads to the observed error. Initialize the type field of the local 'current_crop' before get_crop call. Signed-off-by: Anatolij Gustschin <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
- Loading branch information