]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/mm/numa.c
Merge branch 'akpm-current/current'
[karo-tx-linux.git] / arch / powerpc / mm / numa.c
index 8d8a541211d0dc2164d9f48437a4e21fd3fe13e7..669a15e7fa76a07ad57c3d2b82712766520a049a 100644 (file)
@@ -276,7 +276,6 @@ static int of_node_to_nid_single(struct device_node *device)
 /* Walk the device tree upwards, looking for an associativity id */
 int of_node_to_nid(struct device_node *device)
 {
-       struct device_node *tmp;
        int nid = -1;
 
        of_node_get(device);
@@ -285,9 +284,7 @@ int of_node_to_nid(struct device_node *device)
                if (nid != -1)
                        break;
 
-               tmp = device;
-               device = of_get_parent(tmp);
-               of_node_put(tmp);
+               device = of_get_next_parent(device);
        }
        of_node_put(device);