提交 10a55a18 编写于 作者: J Jyri Sarha

drm/tilcdc: Avoid error print by of_graph_get_next_endpoint()

Avoid error print by of_graph_get_next_endpoint() if there is no ports
present.
Signed-off-by: NJyri Sarha <jsarha@ti.com>
上级 24b31ba0
...@@ -138,12 +138,21 @@ static int dev_match_of(struct device *dev, void *data) ...@@ -138,12 +138,21 @@ static int dev_match_of(struct device *dev, void *data)
int tilcdc_get_external_components(struct device *dev, int tilcdc_get_external_components(struct device *dev,
struct component_match **match) struct component_match **match)
{ {
struct device_node *node;
struct device_node *ep = NULL; struct device_node *ep = NULL;
int count = 0; int count = 0;
while ((ep = of_graph_get_next_endpoint(dev->of_node, ep))) { /* Avoid error print by of_graph_get_next_endpoint() if there
struct device_node *node; * is no ports present.
*/
node = of_get_child_by_name(dev->of_node, "ports");
if (!node)
node = of_get_child_by_name(dev->of_node, "port");
if (!node)
return 0;
of_node_put(node);
while ((ep = of_graph_get_next_endpoint(dev->of_node, ep))) {
node = of_graph_get_remote_port_parent(ep); node = of_graph_get_remote_port_parent(ep);
if (!node && !of_device_is_available(node)) { if (!node && !of_device_is_available(node)) {
of_node_put(node); of_node_put(node);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册