Commit 2d703835 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] soc_camera: pass on streamoff error

If streamoff returned an error, then pass that on to the caller.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 9f317de4
...@@ -1000,6 +1000,7 @@ static int soc_camera_streamoff(struct file *file, void *priv, ...@@ -1000,6 +1000,7 @@ static int soc_camera_streamoff(struct file *file, void *priv,
struct soc_camera_device *icd = file->private_data; struct soc_camera_device *icd = file->private_data;
struct v4l2_subdev *sd = soc_camera_to_subdev(icd); struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
struct soc_camera_host *ici = to_soc_camera_host(icd->parent); struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
int ret;
WARN_ON(priv != file->private_data); WARN_ON(priv != file->private_data);
...@@ -1014,13 +1015,13 @@ static int soc_camera_streamoff(struct file *file, void *priv, ...@@ -1014,13 +1015,13 @@ static int soc_camera_streamoff(struct file *file, void *priv,
* remaining buffers. When the last buffer is freed, stop capture * remaining buffers. When the last buffer is freed, stop capture
*/ */
if (ici->ops->init_videobuf) if (ici->ops->init_videobuf)
videobuf_streamoff(&icd->vb_vidq); ret = videobuf_streamoff(&icd->vb_vidq);
else else
vb2_streamoff(&icd->vb2_vidq, i); ret = vb2_streamoff(&icd->vb2_vidq, i);
v4l2_subdev_call(sd, video, s_stream, 0); v4l2_subdev_call(sd, video, s_stream, 0);
return 0; return ret;
} }
static int soc_camera_cropcap(struct file *file, void *fh, static int soc_camera_cropcap(struct file *file, void *fh,
......
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