Commit 32593dd0 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

media: v4l: fwnode: Parse the graph endpoint as last

Parsing the graph endpoint is always successful; therefore parse it as
last.
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: default avatarSteve Longerbeam <steve_longerbeam@mentor.com>
Tested-by: default avatarJacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent b4357d21
......@@ -303,7 +303,11 @@ static int __v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode,
pr_debug("===== begin V4L2 endpoint properties\n");
fwnode_graph_parse_endpoint(fwnode, &vep->base);
/*
* Zero the fwnode graph endpoint memory in case we don't end up parsing
* the endpoint.
*/
memset(&vep->base, 0, sizeof(vep->base));
/* Zero fields from bus_type to until the end */
memset(&vep->bus_type, 0, sizeof(*vep) -
......@@ -346,6 +350,8 @@ static int __v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode,
return -EINVAL;
}
fwnode_graph_parse_endpoint(fwnode, &vep->base);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment