diff mbox

[3/3,media] s5p-fimc: Stop media entity pipeline if fimc_pipeline_validate fails

Message ID 1337927380-4435-3-git-send-email-sachin.kamat@linaro.org
State Accepted
Headers show

Commit Message

Sachin Kamat May 25, 2012, 6:29 a.m. UTC
Stops the media entity pipeline which was started earlier
if fimc_pipeline_validate fails.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/media/video/s5p-fimc/fimc-capture.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Comments

On 05/25/2012 08:29 AM, Sachin Kamat wrote:
> Stops the media entity pipeline which was started earlier
> if fimc_pipeline_validate fails.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Applied that one too. Thanks.

--
Regards,
Sylwester
diff mbox

Patch

diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c
index 587d087..d9efa64 100644
--- a/drivers/media/video/s5p-fimc/fimc-capture.c
+++ b/drivers/media/video/s5p-fimc/fimc-capture.c
@@ -1057,8 +1057,10 @@  static int fimc_cap_streamon(struct file *file, void *priv,
 
 	if (fimc->vid_cap.user_subdev_api) {
 		ret = fimc_pipeline_validate(fimc);
-		if (ret)
+		if (ret) {
+			media_entity_pipeline_stop(&p->subdevs[IDX_SENSOR]->entity);
 			return ret;
+		}
 	}
 	return vb2_streamon(&fimc->vid_cap.vbq, type);
 }