summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-06-15 11:33:39 (GMT)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-11 12:53:11 (GMT)
commit2d703835b02c0d1adbea4b1eeac188be8e76710b (patch)
tree3f99e2f7855ee94be954bd18de4c37349a2cf592
parent9f317de424dfb57d8c3d3152ace24904bc402810 (diff)
downloadlinux-2d703835b02c0d1adbea4b1eeac188be8e76710b.tar.xz
[media] soc_camera: pass on streamoff error
If streamoff returned an error, then pass that on to the caller. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/platform/soc_camera/soc_camera.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index 6ce6576..0b09281 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -1000,6 +1000,7 @@ static int soc_camera_streamoff(struct file *file, void *priv,
struct soc_camera_device *icd = file->private_data;
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
+ int ret;
WARN_ON(priv != file->private_data);
@@ -1014,13 +1015,13 @@ static int soc_camera_streamoff(struct file *file, void *priv,
* remaining buffers. When the last buffer is freed, stop capture
*/
if (ici->ops->init_videobuf)
- videobuf_streamoff(&icd->vb_vidq);
+ ret = videobuf_streamoff(&icd->vb_vidq);
else
- vb2_streamoff(&icd->vb2_vidq, i);
+ ret = vb2_streamoff(&icd->vb2_vidq, i);
v4l2_subdev_call(sd, video, s_stream, 0);
- return 0;
+ return ret;
}
static int soc_camera_cropcap(struct file *file, void *fh,