Skip to content

Commit

Permalink
[media] s5p-fimc: Stop media entity pipeline if fimc_pipeline_validat…
Browse files Browse the repository at this point in the history
…e 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>
  • Loading branch information
Sachin Kamat authored and Mauro Carvalho Chehab committed Jun 25, 2012
1 parent a1a5861 commit f676fa0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/media/video/s5p-fimc/fimc-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit f676fa0

Please sign in to comment.