Commit b127aa8bafb3b5b555ab0e7d6f87cb8a541a3d46

Authored by Julia Lawall
Committed by David S. Miller
1 parent 75c6d1410c

[SPARC]: Add missing of_node_put

There should be an of_node_put when breaking out of a loop that iterates
using for_each_node_by_type.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

arch/sparc/kernel/devices.c
... ... @@ -62,8 +62,10 @@
62 62 int err = check_cpu_node(dp->node, &cur_inst,
63 63 compare, compare_arg,
64 64 prom_node, mid);
65   - if (!err)
  65 + if (!err) {
  66 + of_node_put(dp);
66 67 return 0;
  68 + }
67 69 }
68 70  
69 71 return -ENODEV;