summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-05-25 03:29:40 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-06-25 09:23:50 -0300
commitf676fa068819357f716953920b764554fe116b3c (patch)
tree1e48932de27e4d3c0eddd1a8f40bf7a3ae0fa947 /drivers/media
parenta1a5861bd9ca3a6cb7ab89dd836da8cd158986b0 (diff)
downloadop-kernel-dev-f676fa068819357f716953920b764554fe116b3c.zip
op-kernel-dev-f676fa068819357f716953920b764554fe116b3c.tar.gz
[media] s5p-fimc: Stop media entity pipeline if fimc_pipeline_validate fails
Stops the media entity pipeline which was started earlier if fimc_pipeline_validate fails. [s.nawrocki: reworked to not exceed 80 characters line length] Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/s5p-fimc/fimc-capture.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c
index 7ace324..725812a 100644
--- a/drivers/media/video/s5p-fimc/fimc-capture.c
+++ b/drivers/media/video/s5p-fimc/fimc-capture.c
@@ -1040,20 +1040,22 @@ static int fimc_cap_streamon(struct file *file, void *priv,
{
struct fimc_dev *fimc = video_drvdata(file);
struct fimc_pipeline *p = &fimc->pipeline;
+ struct v4l2_subdev *sd = p->subdevs[IDX_SENSOR];
int ret;
if (fimc_capture_active(fimc))
return -EBUSY;
- ret = media_entity_pipeline_start(&p->subdevs[IDX_SENSOR]->entity,
- p->m_pipeline);
+ ret = media_entity_pipeline_start(&sd->entity, p->m_pipeline);
if (ret < 0)
return ret;
if (fimc->vid_cap.user_subdev_api) {
ret = fimc_pipeline_validate(fimc);
- if (ret)
+ if (ret < 0) {
+ media_entity_pipeline_stop(&sd->entity);
return ret;
+ }
}
return vb2_streamon(&fimc->vid_cap.vbq, type);
}
OpenPOWER on IntegriCloud