From: Steve Longerbeam Date: Sat, 29 Sep 2018 19:54:04 +0000 (-0400) Subject: media: v4l2-fwnode: ignore endpoints that have no remote port parent X-Git-Tag: v5.15~7696^2~86 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4382f37b78e02bb9a9d68cf0aef7928f0aaeff73;p=platform%2Fkernel%2Flinux-starfive.git media: v4l2-fwnode: ignore endpoints that have no remote port parent 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 Acked-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c index 169bdbb..0b8c736 100644 --- a/drivers/media/v4l2-core/v4l2-fwnode.c +++ b/drivers/media/v4l2-core/v4l2-fwnode.c @@ -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; }