In the current implementation, driver is calling of_graph_get_next_endpoint()
and of_node_put() functions to get next endpoint and decrement refcount of a
node. As the former function is already decrementing refcount, there is no need
of calling the later function which decrements the refcount again.
This patch avoids calling of_node_put() function in driver, as the same has been
taken care in of_graph_get_next_endpoint() implementation.
Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
if (next == NULL)
break;
- of_node_put(ep);
ep = next;
dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
}
}
- of_node_put(ep);
return ret;
}
if (next == NULL)
break;
- of_node_put(ep);
ep = next;
dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
}
}
- of_node_put(ep);
return ret;
}