[media] s5p-fimc: media_entity_pipeline_start() may fail
authorSakari Ailus <sakari.ailus@iki.fi>
Fri, 25 May 2012 10:08:05 +0000 (07:08 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 25 Jun 2012 12:23:21 +0000 (09:23 -0300)
Take into account media_entity_pipeline_start() may fail.

[s.nawrocki: rebased onto latest tree]
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/s5p-fimc/fimc-capture.c

index 71e483847a17c6279c76385ea96650dddaf80abd..7ace324d30cdc7818842dd10bc7133618a627f1c 100644 (file)
@@ -1045,8 +1045,10 @@ static int fimc_cap_streamon(struct file *file, void *priv,
        if (fimc_capture_active(fimc))
                return -EBUSY;
 
-       media_entity_pipeline_start(&p->subdevs[IDX_SENSOR]->entity,
+       ret = media_entity_pipeline_start(&p->subdevs[IDX_SENSOR]->entity,
                                    p->m_pipeline);
+       if (ret < 0)
+               return ret;
 
        if (fimc->vid_cap.user_subdev_api) {
                ret = fimc_pipeline_validate(fimc);