MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_ofw_node_destroy

Function rt_ofw_node_destroy

components/drivers/ofw/base.c:228–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228rt_err_t rt_ofw_node_destroy(struct rt_ofw_node *np)
229{
230 rt_err_t err = RT_EOK;
231
232 if (np)
233 {
234 if (rt_ref_read(&np->ref) <= 1)
235 {
236 ofw_node_destroy(np);
237 }
238 else
239 {
240 err = -RT_EBUSY;
241 }
242 }
243 else
244 {
245 err = -RT_EINVAL;
246 }
247
248 return err;
249}
250
251struct rt_ofw_node *rt_ofw_node_get(struct rt_ofw_node *np)
252{

Callers 1

rt_fdt_unflatten_singleFunction · 0.85

Calls 2

rt_ref_readFunction · 0.85
ofw_node_destroyFunction · 0.85

Tested by

no test coverage detected