upstream: [media] omap3isp: Don't ignore failure to locate external subdev
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sat, 15 Feb 2014 00:45:50 +0000 (21:45 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:54:41 +0000 (11:54 +0900)
A failure to locate the external subdev for a non memory-to-memory
pipeline is a fatal error, don't ignore it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Tested-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/omap3isp/ispvideo.c

index df11597..8ad9e6d 100644 (file)
@@ -889,7 +889,7 @@ static int isp_video_check_external_subdevs(struct isp_video *video,
        struct v4l2_ext_controls ctrls;
        struct v4l2_ext_control ctrl;
        unsigned int i;
-       int ret = 0;
+       int ret;
 
        for (i = 0; i < ARRAY_SIZE(ents); i++) {
                /* Is the entity part of the pipeline? */
@@ -908,7 +908,7 @@ static int isp_video_check_external_subdevs(struct isp_video *video,
 
        if (!source) {
                dev_warn(isp->dev, "can't find source, failing now\n");
-               return ret;
+               return -EINVAL;
        }
 
        if (media_entity_type(source) != MEDIA_ENT_T_V4L2_SUBDEV)