media: omap3isp: Ignore endpoints with invalid configuration
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 28 Feb 2017 11:53:27 +0000 (06:53 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 19 Jul 2017 19:50:13 +0000 (15:50 -0400)
If endpoint has an invalid configuration, ignore it instead of happily
proceeding to use it nonetheless. Ignoring such an endpoint is better than
failing since there could be multiple endpoints, only some of which are
bad.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/omap3isp/isp.c

index dbaede0..2de7a27 100644 (file)
@@ -2111,10 +2111,12 @@ static int isp_fwnodes_parse(struct device *dev,
                if (!isd)
                        goto error;
 
-               notifier->subdevs[notifier->num_subdevs] = &isd->asd;
+               if (isp_fwnode_parse(dev, fwnode, isd)) {
+                       devm_kfree(dev, isd);
+                       continue;
+               }
 
-               if (isp_fwnode_parse(dev, fwnode, isd))
-                       goto error;
+               notifier->subdevs[notifier->num_subdevs] = &isd->asd;
 
                isd->asd.match.fwnode.fwnode =
                        fwnode_graph_get_remote_port_parent(fwnode);