]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: v4l2-fwnode: ignore endpoints that have no remote port parent
authorSteve Longerbeam <slongerbeam@gmail.com>
Sat, 29 Sep 2018 19:54:04 +0000 (15:54 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 4 Oct 2018 18:53:20 +0000 (14:53 -0400)
Documentation/devicetree/bindings/media/video-interfaces.txt states that
the 'remote-endpoint' property is optional.

So v4l2_async_notifier_fwnode_parse_endpoint() should not return error
if the endpoint has no remote port parent. Just ignore the endpoint,
skip adding an asd to the notifier and return 0.
__v4l2_async_notifier_parse_fwnode_endpoints() will then continue
parsing the remaining port endpoints of the device.

Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/v4l2-core/v4l2-fwnode.c

index 169bdbb1f61a51305257a04882dfc87db4b19117..0b8c736b160657debbfd08fe91c07efa3638032d 100644 (file)
@@ -367,7 +367,7 @@ static int v4l2_async_notifier_fwnode_parse_endpoint(
                fwnode_graph_get_remote_port_parent(endpoint);
        if (!asd->match.fwnode) {
                dev_warn(dev, "bad remote port parent\n");
-               ret = -EINVAL;
+               ret = -ENOTCONN;
                goto out_err;
        }