[1/1] s5p-fimc: media_entity_pipeline_start() may fail

Message ID 1335091479-26943-1-git-send-email-sakari.ailus@iki.fi (mailing list archive)
State RFC, archived
Headers

Commit Message

Sakari Ailus April 22, 2012, 10:44 a.m. UTC
Take into account media_entity_pipeline_start() may fail. This patch is
dependent on "media: Add link_validate() op to check links to the sink pad".

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
(Just correct Sylwester's e-mail. Sorry for the noise.)

The dependent patch is part of my pull req to Mauro here:

<URL:http://www.spinics.net/lists/linux-media/msg46296.html>

 drivers/media/video/s5p-fimc/fimc-capture.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
  

Comments

Sylwester Nawrocki April 26, 2012, 8:43 a.m. UTC | #1
Hi Sakari,

thank you for the patch.

On 04/22/2012 12:44 PM, Sakari Ailus wrote:
> Take into account media_entity_pipeline_start() may fail. This patch is
> dependent on "media: Add link_validate() op to check links to the sink pad".
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

I will apply it on my tree for 3.5, when your remaining patches are merged
into the media tree. I really hope they are not delayed another kernel
release.


Regards,
  

Patch

diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c
index dc18ba5..8fd8095 100644
--- a/drivers/media/video/s5p-fimc/fimc-capture.c
+++ b/drivers/media/video/s5p-fimc/fimc-capture.c
@@ -963,7 +963,9 @@  static int fimc_cap_streamon(struct file *file, void *priv,
 	if (fimc_capture_active(fimc))
 		return -EBUSY;
 
-	media_entity_pipeline_start(&p->sensor->entity, p->pipe);
+	ret = media_entity_pipeline_start(&p->sensor->entity, p->pipe);
+	if (ret < 0)
+		return ret;
 
 	if (fimc->vid_cap.user_subdev_api) {
 		ret = fimc_pipeline_validate(fimc);