[media] omap3isp: Don't ignore subdev streamoff failures
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 20 May 2014 21:21:13 +0000 (18:21 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 21 Aug 2014 20:25:12 +0000 (15:25 -0500)
Record the value returned by subdevs from s_stream(0) and handle stop
failures when an error occurs.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Enrico Butera <ebutera@users.sourceforge.net>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/omap3isp/isp.c

index 2c7aa67205693f36287756296aaa6e8debf0bc1c..7b10c461a4970f4d2cca6fb185d42f391b9ab19a 100644 (file)
@@ -999,16 +999,14 @@ static int isp_pipeline_disable(struct isp_pipeline *pipe)
                                         video, s_stream, 0);
                }
 
-               v4l2_subdev_call(subdev, video, s_stream, 0);
+               ret = v4l2_subdev_call(subdev, video, s_stream, 0);
 
                if (subdev == &isp->isp_res.subdev)
-                       ret = isp_pipeline_wait(isp, isp_pipeline_wait_resizer);
+                       ret |= isp_pipeline_wait(isp, isp_pipeline_wait_resizer);
                else if (subdev == &isp->isp_prev.subdev)
-                       ret = isp_pipeline_wait(isp, isp_pipeline_wait_preview);
+                       ret |= isp_pipeline_wait(isp, isp_pipeline_wait_preview);
                else if (subdev == &isp->isp_ccdc.subdev)
-                       ret = isp_pipeline_wait(isp, isp_pipeline_wait_ccdc);
-               else
-                       ret = 0;
+                       ret |= isp_pipeline_wait(isp, isp_pipeline_wait_ccdc);
 
                /* Handle stop failures. An entity that fails to stop can
                 * usually just be restarted. Flag the stop failure nonetheless