.. | .. |
---|
206 | 206 | for_each_child_of_node(local_fixups, child) { |
---|
207 | 207 | |
---|
208 | 208 | for_each_child_of_node(overlay, overlay_child) |
---|
209 | | - if (!node_name_cmp(child, overlay_child)) |
---|
| 209 | + if (!node_name_cmp(child, overlay_child)) { |
---|
| 210 | + of_node_put(overlay_child); |
---|
210 | 211 | break; |
---|
| 212 | + } |
---|
211 | 213 | |
---|
212 | | - if (!overlay_child) |
---|
| 214 | + if (!overlay_child) { |
---|
| 215 | + of_node_put(child); |
---|
213 | 216 | return -EINVAL; |
---|
| 217 | + } |
---|
214 | 218 | |
---|
215 | 219 | err = adjust_local_phandle_references(child, overlay_child, |
---|
216 | 220 | phandle_delta); |
---|
217 | | - if (err) |
---|
| 221 | + if (err) { |
---|
| 222 | + of_node_put(child); |
---|
218 | 223 | return err; |
---|
| 224 | + } |
---|
219 | 225 | } |
---|
220 | 226 | |
---|
221 | 227 | return 0; |
---|
.. | .. |
---|
281 | 287 | adjust_overlay_phandles(overlay, phandle_delta); |
---|
282 | 288 | |
---|
283 | 289 | for_each_child_of_node(overlay, local_fixups) |
---|
284 | | - if (!of_node_cmp(local_fixups->name, "__local_fixups__")) |
---|
| 290 | + if (of_node_name_eq(local_fixups, "__local_fixups__")) |
---|
285 | 291 | break; |
---|
286 | 292 | |
---|
287 | 293 | err = adjust_local_phandle_references(local_fixups, overlay, phandle_delta); |
---|
.. | .. |
---|
291 | 297 | overlay_fixups = NULL; |
---|
292 | 298 | |
---|
293 | 299 | for_each_child_of_node(overlay, child) { |
---|
294 | | - if (!of_node_cmp(child->name, "__fixups__")) |
---|
| 300 | + if (of_node_name_eq(child, "__fixups__")) |
---|
295 | 301 | overlay_fixups = child; |
---|
296 | 302 | } |
---|
297 | 303 | |
---|
.. | .. |
---|
315 | 321 | |
---|
316 | 322 | err = of_property_read_string(tree_symbols, |
---|
317 | 323 | prop->name, &refpath); |
---|
318 | | - if (err) |
---|
| 324 | + if (err) { |
---|
| 325 | + pr_err("node label '%s' not found in live devicetree symbols table\n", |
---|
| 326 | + prop->name); |
---|
319 | 327 | goto out; |
---|
| 328 | + } |
---|
320 | 329 | |
---|
321 | 330 | refnode = of_find_node_by_path(refpath); |
---|
322 | 331 | if (!refnode) { |
---|